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[$module] = $this->moduleHandler->getName($module);
  }
  asort($modules);
  return $modules;
}
doc_Drupal
2016-10-29 09:33:39
Comments
Leave a Comment

Please login to continue.