class RulesEventUserAclDeriver in Content Access 8
Derives 'User was added to ACL' plugin definition.
Hierarchy
- class \Drupal\Component\Plugin\Derivative\DeriverBase implements DeriverInterface
- class \Drupal\content_access\Plugin\Deriver\RulesEventUserAclDeriver implements ContainerDeriverInterface
Expanded class hierarchy of RulesEventUserAclDeriver
1 string reference to 'RulesEventUserAclDeriver'
File
- src/
Plugin/ Deriver/ RulesEventUserAclDeriver.php, line 13
Namespace
Drupal\content_access\Plugin\DeriverView source
class RulesEventUserAclDeriver extends DeriverBase implements ContainerDeriverInterface {
/**
* The module handler.
*
* @var \Drupal\Core\Extension\ModuleHandlerInterface
*/
protected $moduleHandler;
/**
* Creates a new RulesEventUserAclDeriver object.
*
* @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
* The module handler.
*/
public function __construct(ModuleHandlerInterface $module_handler) {
$this->moduleHandler = $module_handler;
}
/**
* {@inheritdoc}
*/
public static function create(ContainerInterface $container, $base_plugin_id) {
return new static($container
->get('module_handler'));
}
/**
* {@inheritdoc}
*/
public function getDerivativeDefinitions($base_plugin_definition) {
if ($this->moduleHandler
->moduleExists('acl')) {
$this->derivatives['content_access_user_acl'] = $base_plugin_definition;
}
return $this->derivatives;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DeriverBase:: |
protected | property | List of derivative definitions. | 1 |
DeriverBase:: |
public | function |
Gets the definition of a derivative plugin. Overrides DeriverInterface:: |
|
RulesEventUserAclDeriver:: |
protected | property | The module handler. | |
RulesEventUserAclDeriver:: |
public static | function |
Creates a new class instance. Overrides ContainerDeriverInterface:: |
|
RulesEventUserAclDeriver:: |
public | function |
Gets the definition of all derivatives of a base plugin. Overrides DeriverBase:: |
|
RulesEventUserAclDeriver:: |
public | function | Creates a new RulesEventUserAclDeriver object. |