class ConfigurablePlugin in Drupal 8
Same name and namespace in other branches
- 9 core/tests/Drupal/Tests/Core/Plugin/DefaultSingleLazyPluginCollectionTest.php \Drupal\Tests\Core\Plugin\ConfigurablePlugin
- 10 core/tests/Drupal/Tests/Core/Plugin/DefaultSingleLazyPluginCollectionTest.php \Drupal\Tests\Core\Plugin\ConfigurablePlugin
Hierarchy
- class \Drupal\Component\Plugin\PluginBase implements DerivativeInspectionInterface, PluginInspectionInterface
- class \Drupal\Tests\Core\Plugin\ConfigurablePlugin implements ConfigurableInterface
Expanded class hierarchy of ConfigurablePlugin
File
- core/
tests/ Drupal/ Tests/ Core/ Plugin/ DefaultSingleLazyPluginCollectionTest.php, line 75
Namespace
Drupal\Tests\Core\PluginView source
class ConfigurablePlugin extends PluginBase implements ConfigurableInterface {
public function __construct(array $configuration, $plugin_id, $plugin_definition) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
$this->configuration = $configuration + $this
->defaultConfiguration();
}
public function defaultConfiguration() {
return [];
}
public function getConfiguration() {
return $this->configuration;
}
public function setConfiguration(array $configuration) {
$this->configuration = $configuration;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ConfigurablePlugin:: |
public | function |
Gets default configuration for this plugin. Overrides ConfigurableInterface:: |
|
ConfigurablePlugin:: |
public | function |
Gets this plugin's configuration. Overrides ConfigurableInterface:: |
|
ConfigurablePlugin:: |
public | function |
Sets the configuration for this plugin instance. Overrides ConfigurableInterface:: |
|
ConfigurablePlugin:: |
public | function |
Constructs a \Drupal\Component\Plugin\PluginBase object. Overrides PluginBase:: |
|
PluginBase:: |
protected | property | Configuration information passed into the plugin. | 1 |
PluginBase:: |
protected | property | The plugin implementation definition. | 1 |
PluginBase:: |
protected | property | The plugin_id. | |
PluginBase:: |
constant | A string which is used to separate base plugin IDs from the derivative ID. | ||
PluginBase:: |
public | function |
Gets the base_plugin_id of the plugin instance. Overrides DerivativeInspectionInterface:: |
|
PluginBase:: |
public | function |
Gets the derivative_id of the plugin instance. Overrides DerivativeInspectionInterface:: |
|
PluginBase:: |
public | function |
Gets the definition of the plugin implementation. Overrides PluginInspectionInterface:: |
3 |
PluginBase:: |
public | function |
Gets the plugin_id of the plugin instance. Overrides PluginInspectionInterface:: |
|
PluginBase:: |
public | function | Determines if the plugin is configurable. |