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@18
|
32 *
|
Chris@18
|
33 * @deprecated in Drupal 8.7.x and will be removed before Drupal 9.0.x. Use
|
Chris@18
|
34 * \Drupal\taxonomy\TermStorage::getVocabularyHierarchyType() instead.
|
Chris@0
|
35 */
|
Chris@0
|
36 public function getHierarchy();
|
Chris@0
|
37
|
Chris@0
|
38 /**
|
Chris@0
|
39 * Sets the vocabulary hierarchy.
|
Chris@0
|
40 *
|
Chris@0
|
41 * @param int $hierarchy
|
Chris@0
|
42 * The hierarchy type of vocabulary.
|
Chris@0
|
43 * Possible values:
|
Chris@0
|
44 * - VocabularyInterface::HIERARCHY_DISABLED: No parents.
|
Chris@0
|
45 * - VocabularyInterface::HIERARCHY_SINGLE: Single parent.
|
Chris@0
|
46 * - VocabularyInterface::HIERARCHY_MULTIPLE: Multiple parents.
|
Chris@0
|
47 *
|
Chris@0
|
48 * @return $this
|
Chris@18
|
49 *
|
Chris@18
|
50 * @deprecated in Drupal 8.7.x and will be removed before Drupal 9.0.x. Reset
|
Chris@18
|
51 * the cache of the taxonomy_term storage handler instead.
|
Chris@0
|
52 */
|
Chris@0
|
53 public function setHierarchy($hierarchy);
|
Chris@0
|
54
|
Chris@0
|
55 /**
|
Chris@0
|
56 * Returns the vocabulary description.
|
Chris@0
|
57 *
|
Chris@0
|
58 * @return string
|
Chris@0
|
59 * The vocabulary description.
|
Chris@0
|
60 */
|
Chris@0
|
61 public function getDescription();
|
Chris@0
|
62
|
Chris@0
|
63 }
|