Added the Search API Synonym module to deal specifically with licence and license...
[yaffs-website] / web / modules / contrib / search_api_synonym / src / SynonymInterface.php
1 <?php
2
3 namespace Drupal\search_api_synonym;
4
5 use Drupal\Core\Entity\ContentEntityInterface;
6 use Drupal\Core\Entity\EntityChangedInterface;
7 use Drupal\Core\Entity\EntityTypeInterface;
8 use Drupal\user\EntityOwnerInterface;
9
10 /**
11  * Provides an interface for defining Synonym entities.
12  *
13  * @ingroup search_api_synonym
14  */
15 interface SynonymInterface extends ContentEntityInterface, EntityChangedInterface, EntityOwnerInterface {
16   // Add get/set methods for your configuration properties here.
17
18   /**
19    * Gets the Synonym type.
20    *
21    * @return string
22    *   Type of the Synonym.
23    */
24   public function getType();
25
26   /**
27    * Sets the Synonym type.
28    *
29    * @param string $type
30    *   The Synonym type.
31    *
32    * @return \Drupal\search_api_synonym\SynonymInterface
33    *   The called Synonym entity.
34    */
35   public function setType($type);
36
37   /**
38    * Gets the Synonym word.
39    *
40    * @return string
41    *   Word of the Synonym.
42    */
43   public function getWord();
44
45   /**
46    * Sets the Synonym word.
47    *
48    * @param string $word
49    *   The Synonym word.
50    *
51    * @return \Drupal\search_api_synonym\SynonymInterface
52    *   The called Synonym entity.
53    */
54   public function setWord($word);
55
56   /**
57    * Gets the synonyms.
58    *
59    * @return string
60    *   The synonyms to the word.
61    */
62   public function getSynonyms();
63
64   /**
65    * Gets the synonyms formatted.
66    *
67    * Format the comma separated synonyms string with extra spaces.
68    *
69    * @return string
70    *   The synonyms to the word.
71    */
72   public function getSynonymsFormatted();
73
74   /**
75    * Sets the synonyms to the word.
76    *
77    * @param string $synonyms
78    *   The synonyms.
79    *
80    * @return \Drupal\search_api_synonym\SynonymInterface
81    *   The called Synonym entity.
82    */
83   public function setSynonyms($synonyms);
84
85   /**
86    * Gets the Synonym creation timestamp.
87    *
88    * @return int
89    *   Creation timestamp of the Synonym.
90    */
91   public function getCreatedTime();
92
93   /**
94    * Sets the Synonym creation timestamp.
95    *
96    * @param int $timestamp
97    *   The Synonym creation timestamp.
98    *
99    * @return \Drupal\search_api_synonym\SynonymInterface
100    *   The called Synonym entity.
101    */
102   public function setCreatedTime($timestamp);
103
104   /**
105    * Returns the Synonym active status indicator.
106    *
107    * Not active synonyms are not used by the search engine.
108    *
109    * @return bool
110    *   TRUE if the Synonym is active.
111    */
112   public function isActive();
113
114   /**
115    * Sets the active status of a Synonym.
116    *
117    * @param bool $active
118    *   TRUE to set this Synonym to active, FALSE to set it to not active.
119    *
120    * @return \Drupal\search_api_synonym\SynonymInterface
121    *   The called Synonym entity.
122    */
123   public function setActive($active);
124
125 }