PermissionHandlerInterface::getPermissions

public PermissionHandlerInterface::getPermissions() Gets all available permissions. Return value array An array whose keys are permission names and whose corresponding values are arrays containing the following key-value pairs: title: The human-readable name of the permission, to be shown on the permission administration page. This should be wrapped in the t() function so it can be translated. description: (optional) A description of what the permission does. This should be wrapped in the t(

PermissionHandlerInterface

Defines an interface to list available permissions. Hierarchy interface \Drupal\user\PermissionHandlerInterface File core/modules/user/src/PermissionHandlerInterface.php, line 8 Namespace Drupal\user Members Name Modifiers Type Description PermissionHandlerInterface::getPermissions public function Gets all available permissions. PermissionHandlerInterface::moduleProvidesPermissions public function Determines whether a module provides some permissions.

PermissionHandler::__construct

public PermissionHandler::__construct(ModuleHandlerInterface $module_handler, TranslationInterface $string_translation, ControllerResolverInterface $controller_resolver) Constructs a new PermissionHandler. Parameters \Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler. \Drupal\Core\StringTranslation\TranslationInterface $string_translation: The string translation. \Drupal\Core\Controller\ControllerResolverInterface $controller_resolver: The controller resolver. Fi

PermissionHandler::systemRebuildModuleData

protected PermissionHandler::systemRebuildModuleData() Wraps system_rebuild_module_data() Return value \Drupal\Core\Extension\Extension[] File core/modules/user/src/PermissionHandler.php, line 237 Class PermissionHandler Provides the available permissions based on yml files. Namespace Drupal\user Code protected function systemRebuildModuleData() { return system_rebuild_module_data(); }

PermissionHandler::sortPermissions

protected PermissionHandler::sortPermissions(array $all_permissions = array()) Sorts the given permissions by provider name and title. Parameters array $all_permissions: The permissions to be sorted. Return value array[] Each return permission is an array with the following keys: title: The title of the permission. description: The description of the permission, defaults to NULL. provider: The provider of the permission. File core/modules/user/src/PermissionHandler.php, line 201 Class

PermissionHandler::moduleProvidesPermissions

public PermissionHandler::moduleProvidesPermissions($module_name) Determines whether a module provides some permissions. Parameters string $module_name: The module name. Return value bool Returns TRUE if the module provides some permissions, otherwise FALSE. Overrides PermissionHandlerInterface::moduleProvidesPermissions File core/modules/user/src/PermissionHandler.php, line 116 Class PermissionHandler Provides the available permissions based on yml files. Namespace Drupal\user Code

PermissionHandler::getYamlDiscovery

protected PermissionHandler::getYamlDiscovery() Gets the YAML discovery. Return value \Drupal\Core\Discovery\YamlDiscovery The YAML discovery. File core/modules/user/src/PermissionHandler.php, line 97 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->getModuleD

PermissionHandler::getPermissions

public PermissionHandler::getPermissions() Gets all available permissions. Return value array An array whose keys are permission names and whose corresponding values are arrays containing the following key-value pairs: title: The human-readable name of the permission, to be shown on the permission administration page. This should be wrapped in the t() function so it can be translated. description: (optional) A description of what the permission does. This should be wrapped in the t() functio

PermissionHandler::getModuleNames

protected PermissionHandler::getModuleNames() Returns all module names. Return value string[] Returns the human readable names of all modules keyed by machine name. File core/modules/user/src/PermissionHandler.php, line 223 Class PermissionHandler Provides the available permissions based on yml files. Namespace Drupal\user Code protected function getModuleNames() { $modules = array(); foreach (array_keys($this->moduleHandler->getModuleList()) as $module) { $modules[$modu

PermissionHandler::buildPermissionsYaml

protected PermissionHandler::buildPermissionsYaml() Builds all permissions provided by .permissions.yml files. Return value array[] Each return permission is an array with the following keys: title: The title of the permission. description: The description of the permission, defaults to NULL. provider: The provider of the permission. File core/modules/user/src/PermissionHandler.php, line 138 Class PermissionHandler Provides the available permissions based on yml files. Namespace D