DependentPluginDefinitionTrait.php 652 B

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