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