Mercurial > hg > isophonics-drupal-site
annotate core/modules/taxonomy/src/VocabularyInterface.php @ 17:129ea1e6d783
Update, including to Drupal core 8.6.10
| author | Chris Cannam |
|---|---|
| date | Thu, 28 Feb 2019 13:21:36 +0000 |
| parents | 4c8ae668cc8c |
| children | af1871eacc83 |
| rev | line source |
|---|---|
| Chris@0 | 1 <?php |
| Chris@0 | 2 |
| Chris@0 | 3 namespace Drupal\taxonomy; |
| Chris@0 | 4 |
| Chris@0 | 5 use Drupal\Core\Config\Entity\ConfigEntityInterface; |
| Chris@0 | 6 |
| Chris@0 | 7 /** |
| Chris@0 | 8 * Provides an interface defining a taxonomy vocabulary entity. |
| Chris@0 | 9 */ |
| Chris@0 | 10 interface VocabularyInterface extends ConfigEntityInterface { |
| Chris@0 | 11 |
| Chris@0 | 12 /** |
| Chris@0 | 13 * Denotes that no term in the vocabulary has a parent. |
| Chris@0 | 14 */ |
| Chris@0 | 15 const HIERARCHY_DISABLED = 0; |
| Chris@0 | 16 |
| Chris@0 | 17 /** |
| Chris@0 | 18 * Denotes that one or more terms in the vocabulary has a single parent. |
| Chris@0 | 19 */ |
| Chris@0 | 20 const HIERARCHY_SINGLE = 1; |
| Chris@0 | 21 |
| Chris@0 | 22 /** |
| Chris@0 | 23 * Denotes that one or more terms in the vocabulary have multiple parents. |
| Chris@0 | 24 */ |
| Chris@0 | 25 const HIERARCHY_MULTIPLE = 2; |
| Chris@0 | 26 |
| Chris@0 | 27 /** |
| Chris@0 | 28 * Returns the vocabulary hierarchy. |
| Chris@0 | 29 * |
| Chris@0 | 30 * @return int |
| Chris@0 | 31 * The vocabulary hierarchy. |
| Chris@0 | 32 */ |
| Chris@0 | 33 public function getHierarchy(); |
| Chris@0 | 34 |
| Chris@0 | 35 /** |
| Chris@0 | 36 * Sets the vocabulary hierarchy. |
| Chris@0 | 37 * |
| Chris@0 | 38 * @param int $hierarchy |
| Chris@0 | 39 * The hierarchy type of vocabulary. |
| Chris@0 | 40 * Possible values: |
| Chris@0 | 41 * - VocabularyInterface::HIERARCHY_DISABLED: No parents. |
| Chris@0 | 42 * - VocabularyInterface::HIERARCHY_SINGLE: Single parent. |
| Chris@0 | 43 * - VocabularyInterface::HIERARCHY_MULTIPLE: Multiple parents. |
| Chris@0 | 44 * |
| Chris@0 | 45 * @return $this |
| Chris@0 | 46 */ |
| Chris@0 | 47 public function setHierarchy($hierarchy); |
| Chris@0 | 48 |
| Chris@0 | 49 /** |
| Chris@0 | 50 * Returns the vocabulary description. |
| Chris@0 | 51 * |
| Chris@0 | 52 * @return string |
| Chris@0 | 53 * The vocabulary description. |
| Chris@0 | 54 */ |
| Chris@0 | 55 public function getDescription(); |
| Chris@0 | 56 |
| Chris@0 | 57 } |
