3 namespace Drupal\taxonomy;
5 use Drupal\Core\Config\Entity\ConfigEntityInterface;
8 * Provides an interface defining a taxonomy vocabulary entity.
10 interface VocabularyInterface extends ConfigEntityInterface {
13 * Denotes that no term in the vocabulary has a parent.
15 const HIERARCHY_DISABLED = 0;
18 * Denotes that one or more terms in the vocabulary has a single parent.
20 const HIERARCHY_SINGLE = 1;
23 * Denotes that one or more terms in the vocabulary have multiple parents.
25 const HIERARCHY_MULTIPLE = 2;
28 * Returns the vocabulary hierarchy.
31 * The vocabulary hierarchy.
33 public function getHierarchy();
36 * Sets the vocabulary hierarchy.
38 * @param int $hierarchy
39 * The hierarchy type of vocabulary.
41 * - VocabularyInterface::HIERARCHY_DISABLED: No parents.
42 * - VocabularyInterface::HIERARCHY_SINGLE: Single parent.
43 * - VocabularyInterface::HIERARCHY_MULTIPLE: Multiple parents.
47 public function setHierarchy($hierarchy);
50 * Returns the vocabulary description.
53 * The vocabulary description.
55 public function getDescription();