trait PluginConfigDependenciesDefinitionTrait in Plugin 8.2
Implements \Drupal\Core\Plugin\PluginConfigDependenciesDefinitionInterface.
Hierarchy
- trait \Drupal\plugin\PluginDefinition\PluginConfigDependenciesDefinitionTrait
1 file declares its use of PluginConfigDependenciesDefinitionTrait
- PluginConfigDependenciesDefinitionTraitTest.php in tests/
src/ Unit/ PluginDefinition/ PluginConfigDependenciesDefinitionTraitTest.php
File
- src/
PluginDefinition/ PluginConfigDependenciesDefinitionTrait.php, line 10
Namespace
Drupal\plugin\PluginDefinitionView source
trait PluginConfigDependenciesDefinitionTrait {
/**
* The dependencies.
*
* @var array[]
* An array of dependencies keyed by the type of dependency. One example:
* @code
* array(
* 'module' => array(
* 'node',
* 'field',
* 'image',
* ),
* );
* @endcode
*
* @return $this
*/
protected $configDependencies = [];
/**
* Implements \Drupal\Core\Plugin\PluginConfigDependenciesDefinitionInterface::setConfigDependencies().
*/
public function setConfigDependencies(array $dependencies) {
$this->configDependencies = $dependencies;
return $this;
}
/**
* Implements \Drupal\Core\Plugin\PluginConfigDependenciesDefinitionInterface::getConfigDependencies().
*/
public function getConfigDependencies() {
return $this->configDependencies;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
PluginConfigDependenciesDefinitionTrait:: |
protected | property | The dependencies. | |
PluginConfigDependenciesDefinitionTrait:: |
public | function | Implements \Drupal\Core\Plugin\PluginConfigDependenciesDefinitionInterface::getConfigDependencies(). | |
PluginConfigDependenciesDefinitionTrait:: |
public | function | Implements \Drupal\Core\Plugin\PluginConfigDependenciesDefinitionInterface::setConfigDependencies(). |