Version 1
[yaffs-website] / web / core / lib / Drupal / Core / Plugin / Definition / DependentPluginDefinitionTrait.php
1 <?php
2
3 namespace Drupal\Core\Plugin\Definition;
4
5 /**
6  * Provides a trait for a plugin definition that has dependencies.
7  */
8 trait DependentPluginDefinitionTrait {
9
10   /**
11    * The dependencies of this plugin definition.
12    *
13    * @var array
14    *
15    * @see \Drupal\Core\Config\Entity\ConfigDependencyManager
16    */
17   protected $config_dependencies = [];
18
19   /**
20    * {@inheritdoc}
21    */
22   public function getConfigDependencies() {
23     return $this->config_dependencies;
24   }
25
26   /**
27    * {@inheritdoc}
28    */
29   public function setConfigDependencies(array $config_dependencies) {
30     $this->config_dependencies = $config_dependencies;
31     return $this;
32   }
33
34 }