SynonymInterface.php 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <?php
  2. namespace Drupal\synonyms;
  3. use Drupal\Core\Config\Entity\ConfigEntityInterface;
  4. use Drupal\Core\Entity\EntityWithPluginCollectionInterface;
  5. use Drupal\synonyms\SynonymsProviderInterface\SynonymsProviderInterface;
  6. /**
  7. * Interface of synonyms configuration entity.
  8. */
  9. interface SynonymInterface extends ConfigEntityInterface, EntityWithPluginCollectionInterface {
  10. /**
  11. * Get ID of the synonyms provider plugin that is set up in this entity.
  12. *
  13. * @return string
  14. * Plugin ID of synonyms provider that corresponds to this configuration
  15. * entity
  16. */
  17. public function getProviderPlugin();
  18. /**
  19. * Get instance of the synonyms provider plugin that is set up in this entity.
  20. *
  21. * @return SynonymsProviderInterface
  22. * Initiated synonyms provider instance that corresponds to this
  23. * configuration entity
  24. */
  25. public function getProviderPluginInstance();
  26. /**
  27. * Set the synonyms provider plugin to use in this entity.
  28. *
  29. * @param string $plugin
  30. * Synonyms provider plugin ID to set in this configuration entity
  31. */
  32. public function setProviderPlugin($plugin);
  33. /**
  34. * Get synonyms provider plugin configuration from this entity.
  35. *
  36. * @return array
  37. * Array of synonyms provider plugin configuration
  38. */
  39. public function getProviderConfiguration();
  40. /**
  41. * Set synonyms provider plugin configuration for this entity.
  42. *
  43. * @param array $provider_configuration
  44. * Array of synonyms provider plugin configuration to set
  45. */
  46. public function setProviderConfiguration(array $provider_configuration);
  47. /**
  48. * Get synonyms behavior configuration from this entity.
  49. *
  50. * @return array
  51. * Array of synonyms behavior configuration
  52. */
  53. public function getBehaviorConfiguration();
  54. /**
  55. * Set synonyms behavior configuration for this entity.
  56. *
  57. * @param array $behavior_configuration
  58. * Array of synonyms behavior configuration to set
  59. */
  60. public function setBehaviorConfiguration(array $behavior_configuration);
  61. }