$this->yamlDiscovery =
new YamlDiscovery('permissions',
$this->moduleHandler->
getModuleDirectories());
} return $this->yamlDiscovery;
} /**
* {@inheritdoc}
*/
public function getPermissions() { $all_permissions =
$this->
buildPermissionsYaml();
return $this->
sortPermissions($all_permissions);
} /**
* {@inheritdoc}
*/
public function moduleProvidesPermissions($module_name) { // @TODO Static cache this information, see
// https://www.drupal.org/node/2339487
$permissions =
$this->
getPermissions();
foreach ($permissions as $permission) {