function UserPermissionsRoleSpecificForm::buildForm

Same name in other branches
  1. 9 core/modules/user/src/Form/UserPermissionsRoleSpecificForm.php \Drupal\user\Form\UserPermissionsRoleSpecificForm::buildForm()
  2. 10 core/modules/user/src/Form/UserPermissionsRoleSpecificForm.php \Drupal\user\Form\UserPermissionsRoleSpecificForm::buildForm()
  3. 11.x core/modules/user/src/Form/UserPermissionsRoleSpecificForm.php \Drupal\user\Form\UserPermissionsRoleSpecificForm::buildForm()

Builds the user permissions administration form for a specific role.

Parameters

array $form: An associative array containing the structure of the form.

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.

\Drupal\user\RoleInterface|null $user_role: (optional) The user role used for this form. Defaults to NULL.

Overrides UserPermissionsForm::buildForm

File

core/modules/user/src/Form/UserPermissionsRoleSpecificForm.php, line 39

Class

UserPermissionsRoleSpecificForm
Provides the user permissions administration form for a specific role.

Namespace

Drupal\user\Form

Code

public function buildForm(array $form, FormStateInterface $form_state, RoleInterface $user_role = NULL) {
    $this->userRole = $user_role;
    return parent::buildForm($form, $form_state);
}

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