8.5.x ConditionPluginBase.php ConditionPluginBase::__construct(array $configuration, $plugin_id, $plugin_definition)
8.0.x ConditionPluginBase.php ConditionPluginBase::__construct(array $configuration, $plugin_id, $plugin_definition)
8.1.x ConditionPluginBase.php ConditionPluginBase::__construct(array $configuration, $plugin_id, $plugin_definition)
8.2.x ConditionPluginBase.php ConditionPluginBase::__construct(array $configuration, $plugin_id, $plugin_definition)
8.3.x ConditionPluginBase.php ConditionPluginBase::__construct(array $configuration, $plugin_id, $plugin_definition)
8.4.x ConditionPluginBase.php ConditionPluginBase::__construct(array $configuration, $plugin_id, $plugin_definition)
8.6.x ConditionPluginBase.php ConditionPluginBase::__construct(array $configuration, $plugin_id, $plugin_definition)

Overrides \Drupal\Component\Plugin\PluginBase::__construct().

Overrides the construction of context aware plugins to allow for unvalidated constructor based injection of contexts.

Parameters

array $configuration: The plugin configuration, i.e. an array with configuration values keyed by configuration option name. The special key 'context' may be used to initialize the defined contexts by setting it to an array of context values keyed by context names.

string $plugin_id: The plugin_id for the plugin instance.

mixed $plugin_definition: The plugin implementation definition.

Overrides ContextAwarePluginBase::__construct

4 methods override ConditionPluginBase::__construct()
CurrentThemeCondition::__construct in core/modules/system/src/Plugin/Condition/CurrentThemeCondition.php
Constructs a CurrentThemeCondition condition plugin.
Language::__construct in core/modules/language/src/Plugin/Condition/Language.php
Creates a new Language instance.
NodeType::__construct in core/modules/node/src/Plugin/Condition/NodeType.php
Creates a new NodeType instance.
RequestPath::__construct in core/modules/system/src/Plugin/Condition/RequestPath.php
Constructs a RequestPath condition plugin.

File

core/lib/Drupal/Core/Condition/ConditionPluginBase.php, line 34

Class

ConditionPluginBase
Provides a basis for fulfilling contexts for condition plugins.

Namespace

Drupal\Core\Condition

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this
    ->setConfiguration($configuration);
}