You are here

public function ConditionPluginBase::__construct in Drupal 8

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Condition/ConditionPluginBase.php \Drupal\Core\Condition\ConditionPluginBase::__construct()

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 calls to 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.
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);
}