trait DependentPluginDefinitionTrait

Same name in other branches
  1. 8.9.x core/lib/Drupal/Core/Plugin/Definition/DependentPluginDefinitionTrait.php \Drupal\Core\Plugin\Definition\DependentPluginDefinitionTrait
  2. 10 core/lib/Drupal/Core/Plugin/Definition/DependentPluginDefinitionTrait.php \Drupal\Core\Plugin\Definition\DependentPluginDefinitionTrait
  3. 11.x core/lib/Drupal/Core/Plugin/Definition/DependentPluginDefinitionTrait.php \Drupal\Core\Plugin\Definition\DependentPluginDefinitionTrait

Provides a trait for a plugin definition that has dependencies.

Hierarchy

1 file declares its use of DependentPluginDefinitionTrait
LayoutDefinition.php in core/lib/Drupal/Core/Layout/LayoutDefinition.php

File

core/lib/Drupal/Core/Plugin/Definition/DependentPluginDefinitionTrait.php, line 8

Namespace

Drupal\Core\Plugin\Definition
View source
trait DependentPluginDefinitionTrait {
    
    /**
     * The dependencies of this plugin definition.
     *
     * @var array
     *
     * @see \Drupal\Core\Config\Entity\ConfigDependencyManager
     */
    protected $config_dependencies = [];
    
    /**
     * {@inheritdoc}
     */
    public function getConfigDependencies() {
        return $this->config_dependencies;
    }
    
    /**
     * {@inheritdoc}
     */
    public function setConfigDependencies(array $config_dependencies) {
        $this->config_dependencies = $config_dependencies;
        return $this;
    }

}

Members

Title Sort descending Modifiers Object type Summary
DependentPluginDefinitionTrait::$config_dependencies protected property The dependencies of this plugin definition.
DependentPluginDefinitionTrait::getConfigDependencies public function
DependentPluginDefinitionTrait::setConfigDependencies public function

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