class ConfigurablePlugin in Drupal 10
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Core/Plugin/DefaultSingleLazyPluginCollectionTest.php \Drupal\Tests\Core\Plugin\ConfigurablePlugin
- 9 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. | |
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 | ||
PluginBase:: |
public | function | ||
PluginBase:: |
public | function | 2 | |
PluginBase:: |
public | function | ||
PluginBase:: |
public | function | Determines if the plugin is configurable. |