function PermissionHandler::getYamlDiscovery

Same name and namespace in other branches
  1. 9 core/modules/user/src/PermissionHandler.php \Drupal\user\PermissionHandler::getYamlDiscovery()
  2. 8.9.x core/modules/user/src/PermissionHandler.php \Drupal\user\PermissionHandler::getYamlDiscovery()
  3. 11.x core/modules/user/src/PermissionHandler.php \Drupal\user\PermissionHandler::getYamlDiscovery()

Gets the YAML discovery.

Return value

\Drupal\Core\Discovery\YamlDiscovery The YAML discovery.

File

core/modules/user/src/PermissionHandler.php, line 114

Class

PermissionHandler
Provides the available permissions based on yml files.

Namespace

Drupal\user

Code

protected function getYamlDiscovery() {
    if (!isset($this->yamlDiscovery)) {
        $this->yamlDiscovery = new YamlDiscovery('permissions', $this->moduleHandler
            ->getModuleDirectories());
    }
    return $this->yamlDiscovery;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.