function PluginBase::__construct

Same name in this branch
  1. 11.x core/modules/views/src/Plugin/views/PluginBase.php \Drupal\views\Plugin\views\PluginBase::__construct()
Same name in other branches
  1. 9 core/modules/views/src/Plugin/views/PluginBase.php \Drupal\views\Plugin\views\PluginBase::__construct()
  2. 9 core/lib/Drupal/Component/Plugin/PluginBase.php \Drupal\Component\Plugin\PluginBase::__construct()
  3. 8.9.x core/modules/views/src/Plugin/views/PluginBase.php \Drupal\views\Plugin\views\PluginBase::__construct()
  4. 8.9.x core/lib/Drupal/Component/Plugin/PluginBase.php \Drupal\Component\Plugin\PluginBase::__construct()
  5. 10 core/modules/views/src/Plugin/views/PluginBase.php \Drupal\views\Plugin\views\PluginBase::__construct()
  6. 10 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.

9 calls to PluginBase::__construct()
ConfigurablePlugin::__construct in core/tests/Drupal/Tests/Core/Plugin/DefaultSingleLazyPluginCollectionTest.php
Constructs a \Drupal\Component\Plugin\PluginBase object.
IconExtractorWithFinder::__construct in core/lib/Drupal/Core/Theme/Icon/IconExtractorWithFinder.php
Constructs a IconExtractorWithFinder object.
LocalActionDefault::__construct in core/lib/Drupal/Core/Menu/LocalActionDefault.php
Constructs a LocalActionDefault object.
MockUserLoginBlock::__construct in core/modules/system/tests/modules/plugin_test/src/Plugin/plugin_test/mock_block/MockUserLoginBlock.php
Constructs a \Drupal\Component\Plugin\PluginBase object.
PageActions::__construct in core/modules/navigation/src/Plugin/TopBarItem/PageActions.php
Constructs a PageActions object.

... See full list

9 methods override PluginBase::__construct()
ConfigurablePlugin::__construct in core/tests/Drupal/Tests/Core/Plugin/DefaultSingleLazyPluginCollectionTest.php
Constructs a \Drupal\Component\Plugin\PluginBase object.
IconExtractorWithFinder::__construct in core/lib/Drupal/Core/Theme/Icon/IconExtractorWithFinder.php
Constructs a IconExtractorWithFinder object.
LocalActionDefault::__construct in core/lib/Drupal/Core/Menu/LocalActionDefault.php
Constructs a LocalActionDefault object.
MockUserLoginBlock::__construct in core/modules/system/tests/modules/plugin_test/src/Plugin/plugin_test/mock_block/MockUserLoginBlock.php
Constructs a \Drupal\Component\Plugin\PluginBase object.
PageActions::__construct in core/modules/navigation/src/Plugin/TopBarItem/PageActions.php
Constructs a PageActions object.

... 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;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.