function PermissionHandler::__construct

Same name and namespace in other branches
  1. 11.x core/modules/user/src/PermissionHandler.php \Drupal\user\PermissionHandler::__construct()
  2. 10 core/modules/user/src/PermissionHandler.php \Drupal\user\PermissionHandler::__construct()
  3. 9 core/modules/user/src/PermissionHandler.php \Drupal\user\PermissionHandler::__construct()
  4. 8.9.x core/modules/user/src/PermissionHandler.php \Drupal\user\PermissionHandler::__construct()

Constructs a new PermissionHandler.

Parameters

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

\Drupal\Core\StringTranslation\TranslationInterface $string_translation: The string translation.

\Drupal\Core\Utility\CallableResolver $callableResolver: The callable resolver.

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

File

core/modules/user/src/PermissionHandler.php, line 76

Class

PermissionHandler
Provides the available permissions based on yml files.

Namespace

Drupal\user

Code

public function __construct(protected ModuleHandlerInterface $moduleHandler, TranslationInterface $string_translation, protected CallableResolver $callableResolver, protected ModuleExtensionList $moduleExtensionList) {
  $this->stringTranslation = $string_translation;
}

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