function UserPermissionsForm::__construct

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

Constructs a new UserPermissionsForm.

Parameters

\Drupal\user\PermissionHandlerInterface $permission_handler: The permission handler.

\Drupal\user\RoleStorageInterface $role_storage: The role storage.

\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler.

\Drupal\Core\Extension\ModuleExtensionList|null $moduleExtensionList: The module extension list.

1 call to UserPermissionsForm::__construct()
EntityPermissionsForm::__construct in core/modules/user/src/Form/EntityPermissionsForm.php
Constructs a new EntityPermissionsForm.
1 method overrides UserPermissionsForm::__construct()
EntityPermissionsForm::__construct in core/modules/user/src/Form/EntityPermissionsForm.php
Constructs a new EntityPermissionsForm.

File

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

Class

UserPermissionsForm
Provides the user permissions administration form.

Namespace

Drupal\user\Form

Code

public function __construct(PermissionHandlerInterface $permission_handler, RoleStorageInterface $role_storage, ModuleHandlerInterface $module_handler, ?ModuleExtensionList $moduleExtensionList = NULL) {
    $this->permissionHandler = $permission_handler;
    $this->roleStorage = $role_storage;
    $this->moduleHandler = $module_handler;
    if ($this->moduleExtensionList === NULL) {
        @trigger_error('Calling ' . __METHOD__ . '() without the $moduleExtensionList argument is deprecated in drupal:10.3.0 and will be required in drupal:12.0.0. See https://www.drupal.org/node/3310017', E_USER_DEPRECATED);
        $this->moduleExtensionList = \Drupal::service('extension.list.module');
    }
}

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