public function RoleBase::getAllModulePerms

8.0.x RoleBase.php public RoleBase::getAllModulePerms()
7.x RoleBase.php public RoleBase::getAllModulePerms()
master RoleBase.php public RoleBase::getAllModulePerms()
1 method overrides RoleBase::getAllModulePerms()

File

lib/Drush/Role/RoleBase.php, line 67

Namespace

Drush\Role

Class

RoleBase

Code

public function getAllModulePerms() {
  $permissions = array();
  drush_include_engine('drupal', 'environment');
  $module_list = drush_module_list();
  ksort($module_list);
  foreach ($module_list as $module) {
    if ($perms = $this->getModulePerms($module)) {
      $permissions = array_merge($permissions, $perms);
    }
  }
  return $permissions;
}