Same name and namespace in other branches
  1. 8.9.x core/lib/Drupal/Component/Plugin/PluginBase.php \Drupal\Component\Plugin\PluginBase::__construct()
  2. 9 core/lib/Drupal/Component/Plugin/PluginBase.php \Drupal\Component\Plugin\PluginBase::__construct()

Constructs a \Drupal\Component\Plugin\PluginBase 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.

38 calls to PluginBase::__construct()
Ajax::__construct in core/lib/Drupal/Core/Render/Element/Ajax.php
Constructs a \Drupal\Component\Plugin\PluginBase object.
BreakLockLink::__construct in core/lib/Drupal/Core/TempStore/Element/BreakLockLink.php
Constructs a new BreakLockLink.
CKEditor5PluginDefault::__construct in core/modules/ckeditor5/src/Plugin/CKEditor5PluginDefault.php
Constructs a \Drupal\Component\Plugin\PluginBase object.
ConditionPluginBase::__construct in core/lib/Drupal/Core/Condition/ConditionPluginBase.php
Constructs a \Drupal\Component\Plugin\PluginBase object.
ConfigurableActionBase::__construct in core/lib/Drupal/Core/Action/ConfigurableActionBase.php
Constructs a \Drupal\Component\Plugin\PluginBase object.

... See full list

40 methods override PluginBase::__construct()
Ajax::__construct in core/lib/Drupal/Core/Render/Element/Ajax.php
Constructs a \Drupal\Component\Plugin\PluginBase object.
BreakLockLink::__construct in core/lib/Drupal/Core/TempStore/Element/BreakLockLink.php
Constructs a new BreakLockLink.
CKEditor5PluginDefault::__construct in core/modules/ckeditor5/src/Plugin/CKEditor5PluginDefault.php
Constructs a \Drupal\Component\Plugin\PluginBase object.
ConditionPluginBase::__construct in core/lib/Drupal/Core/Condition/ConditionPluginBase.php
Constructs a \Drupal\Component\Plugin\PluginBase object.
ConfigNamesMapper::__construct in core/modules/config_translation/src/ConfigNamesMapper.php
Constructs a ConfigNamesMapper.

... See full list

File

core/lib/Drupal/Component/Plugin/PluginBase.php, line 53

Class

PluginBase
Base class for plugins wishing to support metadata inspection.

Namespace

Drupal\Component\Plugin

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition) {
  $this->configuration = $configuration;
  $this->pluginId = $plugin_id;
  $this->pluginDefinition = $plugin_definition;
}