TestConfigurablePlugin.php 746 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. namespace Drupal\Tests\Core\Plugin\Fixtures;
  3. use Drupal\Component\Plugin\ConfigurableInterface;
  4. use Drupal\Component\Plugin\DependentPluginInterface;
  5. use Drupal\Component\Plugin\PluginBase;
  6. class TestConfigurablePlugin extends PluginBase implements ConfigurableInterface, DependentPluginInterface {
  7. /**
  8. * {@inheritdoc}
  9. */
  10. public function getConfiguration() {
  11. return $this->configuration;
  12. }
  13. /**
  14. * {@inheritdoc}
  15. */
  16. public function setConfiguration(array $configuration) {
  17. $this->configuration = $configuration;
  18. }
  19. /**
  20. * {@inheritdoc}
  21. */
  22. public function defaultConfiguration() {
  23. return [];
  24. }
  25. /**
  26. * {@inheritdoc}
  27. */
  28. public function calculateDependencies() {
  29. return [];
  30. }
  31. }