public function PermissionsRoleSpecificForm::buildForm in Filter Permissions 8
Form constructor.
Parameters
array $form: An associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
Return value
array The form structure.
Overrides PermissionsForm::buildForm
File
- src/
Form/ PermissionsRoleSpecificForm.php, line 16
Class
- PermissionsRoleSpecificForm
- Provides the user permissions administration form for a specific role.
Namespace
Drupal\filter_perms\FormCode
public function buildForm(array $form, FormStateInterface $form_state, RoleInterface $user_role = NULL) {
$this
->saveFilterSettings((array) $user_role
->id(), (array) self::ALL_OPTIONS);
return $this
->redirect('user.admin_permissions');
}