function UserPermissionsForm::getRoles
Same name in other branches
- 9 core/modules/user/src/Form/UserPermissionsForm.php \Drupal\user\Form\UserPermissionsForm::getRoles()
- 8.9.x core/modules/user/src/Form/UserPermissionsForm.php \Drupal\user\Form\UserPermissionsForm::getRoles()
- 10 core/modules/user/src/Form/UserPermissionsForm.php \Drupal\user\Form\UserPermissionsForm::getRoles()
Gets the roles to display in this form.
Return value
\Drupal\user\RoleInterface[] An array of role objects.
1 call to UserPermissionsForm::getRoles()
- UserPermissionsForm::buildForm in core/
modules/ user/ src/ Form/ UserPermissionsForm.php - Form constructor.
1 method overrides UserPermissionsForm::getRoles()
- UserPermissionsRoleSpecificForm::getRoles in core/
modules/ user/ src/ Form/ UserPermissionsRoleSpecificForm.php - Gets the roles to display in this form.
File
-
core/
modules/ user/ src/ Form/ UserPermissionsForm.php, line 88
Class
- UserPermissionsForm
- Provides the user permissions administration form.
Namespace
Drupal\user\FormCode
protected function getRoles() {
return $this->roleStorage
->loadMultiple();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.