You are here

protected function UserPermissionsForm::getRoles in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/user/src/Form/UserPermissionsForm.php \Drupal\user\Form\UserPermissionsForm::getRoles()
  2. 9 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.

File

core/modules/user/src/Form/UserPermissionsForm.php, line 80

Class

UserPermissionsForm
Provides the user permissions administration form.

Namespace

Drupal\user\Form

Code

protected function getRoles() {
  return $this->roleStorage
    ->loadMultiple();
}