function UserPermissionsModuleSpecificForm::permissionsByProvider

Same name and namespace in other branches
  1. 9 core/modules/user/src/Form/UserPermissionsModuleSpecificForm.php \Drupal\user\Form\UserPermissionsModuleSpecificForm::permissionsByProvider()
  2. 11.x core/modules/user/src/Form/UserPermissionsModuleSpecificForm.php \Drupal\user\Form\UserPermissionsModuleSpecificForm::permissionsByProvider()

Group permissions by the modules that provide them.

Return value

string[][] A nested array. The outer keys are modules that provide permissions. The inner arrays are permission names keyed by their machine names.

Overrides UserPermissionsForm::permissionsByProvider

File

core/modules/user/src/Form/UserPermissionsModuleSpecificForm.php, line 28

Class

UserPermissionsModuleSpecificForm
Provides the user permissions administration form for one or more module(s).

Namespace

Drupal\user\Form

Code

protected function permissionsByProvider() : array {
    return array_intersect_key(parent::permissionsByProvider(), array_flip($this->moduleList));
}

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