public function PluginBase::__construct

Same name in this branch
  1. 9.x drupal/core/lib/Drupal/Component/Plugin/PluginBase.php \Drupal\Component\Plugin\PluginBase::__construct()
  2. 9.x drupal/core/modules/views/lib/Drupal/views/Plugin/views/PluginBase.php \Drupal\views\Plugin\views\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.

DiscoveryInterface $discovery: The Discovery class that holds access to the plugin implementation definition.

6 calls to PluginBase::__construct()
FormatterBase::__construct in drupal/core/modules/field/lib/Drupal/field/Plugin/Type/Formatter/FormatterBase.php
Constructs a FormatterBase object.
JoinPluginBase::__construct in drupal/core/modules/views/lib/Drupal/views/Plugin/views/join/JoinPluginBase.php
Constructs a Drupal\views\Plugin\views\join\JoinPluginBase object.
MockUserLoginBlock::__construct in drupal/core/modules/system/tests/modules/plugin_test/lib/Drupal/plugin_test/Plugin/plugin_test/mock_block/MockUserLoginBlock.php
Constructs a Drupal\Component\Plugin\PluginBase object.
PluginBase::__construct in drupal/core/modules/views/lib/Drupal/views/Plugin/views/PluginBase.php
Constructs a Plugin object.
StaticLayout::__construct in drupal/core/modules/layout/lib/Drupal/layout/Plugin/layout/layout/StaticLayout.php
Overrides Drupal\Component\Plugin\PluginBase::__construct().

... See full list

6 methods override PluginBase::__construct()
FormatterBase::__construct in drupal/core/modules/field/lib/Drupal/field/Plugin/Type/Formatter/FormatterBase.php
Constructs a FormatterBase object.
JoinPluginBase::__construct in drupal/core/modules/views/lib/Drupal/views/Plugin/views/join/JoinPluginBase.php
Constructs a Drupal\views\Plugin\views\join\JoinPluginBase object.
MockUserLoginBlock::__construct in drupal/core/modules/system/tests/modules/plugin_test/lib/Drupal/plugin_test/Plugin/plugin_test/mock_block/MockUserLoginBlock.php
Constructs a Drupal\Component\Plugin\PluginBase object.
PluginBase::__construct in drupal/core/modules/views/lib/Drupal/views/Plugin/views/PluginBase.php
Constructs a Plugin object.
StaticLayout::__construct in drupal/core/modules/layout/lib/Drupal/layout/Plugin/layout/layout/StaticLayout.php
Overrides Drupal\Component\Plugin\PluginBase::__construct().

... See full list

File

drupal/core/lib/Drupal/Component/Plugin/PluginBase.php, line 48
Definition of Drupal\Component\Plugin\PluginBase

Class

PluginBase
Base class for plugins wishing to support metadata inspection.

Namespace

Drupal\Component\Plugin

Code

public function __construct(array $configuration, $plugin_id, DiscoveryInterface $discovery) {
  $this->configuration = $configuration;
  $this->plugin_id = $plugin_id;
  $this->discovery = $discovery;
}