trait DependentPluginDefinitionTrait

Same name in other branches
  1. 9 core/lib/Drupal/Core/Plugin/Definition/DependentPluginDefinitionTrait.php \Drupal\Core\Plugin\Definition\DependentPluginDefinitionTrait
  2. 8.9.x core/lib/Drupal/Core/Plugin/Definition/DependentPluginDefinitionTrait.php \Drupal\Core\Plugin\Definition\DependentPluginDefinitionTrait
  3. 10 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
     */
    // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName
    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


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