function Permission::__construct
Same name in other branches
- 9 core/modules/user/src/Plugin/views/access/Permission.php \Drupal\user\Plugin\views\access\Permission::__construct()
- 8.9.x core/modules/user/src/Plugin/views/access/Permission.php \Drupal\user\Plugin\views\access\Permission::__construct()
- 11.x core/modules/user/src/Plugin/views/access/Permission.php \Drupal\user\Plugin\views\access\Permission::__construct()
Constructs a Permission object.
Parameters
array $configuration: A configuration array containing information about the plugin instance.
string $plugin_id: The plugin ID for the plugin instance.
mixed $plugin_definition: The plugin implementation definition.
\Drupal\user\PermissionHandlerInterface $permission_handler: The permission handler.
\Drupal\Core\Extension\ModuleExtensionList|\Drupal\Core\Extension\ModuleHandlerInterface $module_extension_list: The module extension list.
Overrides PluginBase::__construct
File
-
core/
modules/ user/ src/ Plugin/ views/ access/ Permission.php, line 68
Class
- Permission
- Access plugin that provides permission-based access control.
Namespace
Drupal\user\Plugin\views\accessCode
public function __construct(array $configuration, $plugin_id, $plugin_definition, PermissionHandlerInterface $permission_handler, ModuleExtensionList|ModuleHandlerInterface $module_extension_list) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
$this->permissionHandler = $permission_handler;
if ($module_extension_list instanceof ModuleHandlerInterface) {
@trigger_error('Calling ' . __METHOD__ . '() with the $module_extension_list argument as ModuleHandlerInterface 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);
$module_extension_list = \Drupal::service('extension.list.module');
}
$this->moduleExtensionList = $module_extension_list;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.