ConfigurablePluginInterface.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. namespace Drupal\Component\Plugin;
  3. /**
  4. * Provides an interface for a configurable plugin.
  5. *
  6. * @deprecated Drupal\Component\Plugin\ConfigurablePluginInterface is deprecated
  7. * in Drupal 8.7.0 and will be removed before Drupal 9.0.0. You should implement
  8. * ConfigurableInterface and/or DependentPluginInterface directly as needed. If
  9. * you implement ConfigurableInterface you may choose to implement
  10. * ConfigurablePluginInterface in Drupal 8 as well for maximum compatibility,
  11. * however this must be removed prior to Drupal 9.
  12. *
  13. * @see https://www.drupal.org/node/2946161
  14. *
  15. * @ingroup plugin_api
  16. */
  17. interface ConfigurablePluginInterface extends DependentPluginInterface {
  18. /**
  19. * Gets this plugin's configuration.
  20. *
  21. * @return array
  22. * An array of this plugin's configuration.
  23. */
  24. public function getConfiguration();
  25. /**
  26. * Sets the configuration for this plugin instance.
  27. *
  28. * @param array $configuration
  29. * An associative array containing the plugin's configuration.
  30. */
  31. public function setConfiguration(array $configuration);
  32. /**
  33. * Gets default configuration for this plugin.
  34. *
  35. * @return array
  36. * An associative array with the default configuration.
  37. */
  38. public function defaultConfiguration();
  39. }