3 namespace Drupal\search_api_synonym;
5 use Drupal\Core\Entity\ContentEntityInterface;
6 use Drupal\Core\Entity\EntityChangedInterface;
7 use Drupal\Core\Entity\EntityTypeInterface;
8 use Drupal\user\EntityOwnerInterface;
11 * Provides an interface for defining Synonym entities.
13 * @ingroup search_api_synonym
15 interface SynonymInterface extends ContentEntityInterface, EntityChangedInterface, EntityOwnerInterface {
16 // Add get/set methods for your configuration properties here.
19 * Gets the Synonym type.
22 * Type of the Synonym.
24 public function getType();
27 * Sets the Synonym type.
32 * @return \Drupal\search_api_synonym\SynonymInterface
33 * The called Synonym entity.
35 public function setType($type);
38 * Gets the Synonym word.
41 * Word of the Synonym.
43 public function getWord();
46 * Sets the Synonym word.
51 * @return \Drupal\search_api_synonym\SynonymInterface
52 * The called Synonym entity.
54 public function setWord($word);
60 * The synonyms to the word.
62 public function getSynonyms();
65 * Gets the synonyms formatted.
67 * Format the comma separated synonyms string with extra spaces.
70 * The synonyms to the word.
72 public function getSynonymsFormatted();
75 * Sets the synonyms to the word.
77 * @param string $synonyms
80 * @return \Drupal\search_api_synonym\SynonymInterface
81 * The called Synonym entity.
83 public function setSynonyms($synonyms);
86 * Gets the Synonym creation timestamp.
89 * Creation timestamp of the Synonym.
91 public function getCreatedTime();
94 * Sets the Synonym creation timestamp.
96 * @param int $timestamp
97 * The Synonym creation timestamp.
99 * @return \Drupal\search_api_synonym\SynonymInterface
100 * The called Synonym entity.
102 public function setCreatedTime($timestamp);
105 * Returns the Synonym active status indicator.
107 * Not active synonyms are not used by the search engine.
110 * TRUE if the Synonym is active.
112 public function isActive();
115 * Sets the active status of a Synonym.
117 * @param bool $active
118 * TRUE to set this Synonym to active, FALSE to set it to not active.
120 * @return \Drupal\search_api_synonym\SynonymInterface
121 * The called Synonym entity.
123 public function setActive($active);