VocabularyInterface::setHierarchy

public VocabularyInterface::setHierarchy($hierarchy) Sets the vocabulary hierarchy. Parameters int $hierarchy: The hierarchy type of vocabulary. Possible values: VocabularyInterface::HIERARCHY_DISABLED: No parents. VocabularyInterface::HIERARCHY_SINGLE: Single parent. VocabularyInterface::HIERARCHY_MULTIPLE: Multiple parents. Return value $this File core/modules/taxonomy/src/VocabularyInterface.php, line 47 Class VocabularyInterface Provides an interface defining a taxonomy vocabula

VocabularyInterface::HIERARCHY_SINGLE

Denotes that one or more terms in the vocabulary has a single parent. File core/modules/taxonomy/src/VocabularyInterface.php, line 20 Class VocabularyInterface Provides an interface defining a taxonomy vocabulary entity. Namespace Drupal\taxonomy Code const HIERARCHY_SINGLE = 1;

VocabularyInterface

Provides an interface defining a taxonomy vocabulary entity. Hierarchy interface \Drupal\Core\Entity\EntityInterface; interface \Drupal\Core\Config\Entity\ThirdPartySettingsInterfaceinterface \Drupal\Core\Config\Entity\ConfigEntityInterfaceinterface \Drupal\taxonomy\VocabularyInterface File core/modules/taxonomy/src/VocabularyInterface.php, line 10 Namespace Drupal\taxonomy Members Name Modifiers Type Description AccessibleInterface::access public function Checks data

VocabularyForm::__construct

public VocabularyForm::__construct(VocabularyStorageInterface $vocabulary_storage) Constructs a new vocabulary form. Parameters \Drupal\taxonomy\VocabularyStorageInterface $vocabulary_storage: The vocabulary storage. File core/modules/taxonomy/src/VocabularyForm.php, line 30 Class VocabularyForm Base form for vocabulary edit forms. Namespace Drupal\taxonomy Code public function __construct(VocabularyStorageInterface $vocabulary_storage) { $this->vocabularyStorage = $vocabulary_st

VocabularyForm::exists

public VocabularyForm::exists($vid) Determines if the vocabulary already exists. Parameters string $vid: The vocabulary ID. Return value bool TRUE if the vocabulary exists, FALSE otherwise. File core/modules/taxonomy/src/VocabularyForm.php, line 151 Class VocabularyForm Base form for vocabulary edit forms. Namespace Drupal\taxonomy Code public function exists($vid) { $action = $this->vocabularyStorage->load($vid); return !empty($action); }

VocabularyForm::create

public static VocabularyForm::create(ContainerInterface $container) Instantiates a new instance of this class. This is a factory method that returns a new instance of this class. The factory should pass any needed dependencies into the constructor of this class, but not the container itself. Every call to this method must return a new instance of this class; that is, it may not implement a singleton. Parameters \Symfony\Component\DependencyInjection\ContainerInterface $container: The service c

VocabularyForm::save

public VocabularyForm::save(array $form, FormStateInterface $form_state) Form submission handler for the 'save' action. Normally this method should be overridden to provide specific messages to the user and redirect the form after the entity has been saved. Parameters array $form: An associative array containing the structure of the form. \Drupal\Core\Form\FormStateInterface $form_state: The current state of the form. Return value int Either SAVED_NEW or SAVED_UPDATED, depending on the operat

VocabularyForm::form

public VocabularyForm::form(array $form, FormStateInterface $form_state) Gets the actual form array to be built. Overrides EntityForm::form See also \Drupal\Core\Entity\EntityForm::processForm() \Drupal\Core\Entity\EntityForm::afterBuild() File core/modules/taxonomy/src/VocabularyForm.php, line 46 Class VocabularyForm Base form for vocabulary edit forms. Namespace Drupal\taxonomy Code public function form(array $form, FormStateInterface $form_state) { $vocabulary = $this->entity;

VocabularyForm

Base form for vocabulary edit forms. Hierarchy class \Drupal\Core\Form\FormBase implements ContainerInjectionInterface, FormInterface uses DependencySerializationTrait, LoggerChannelTrait, LinkGeneratorTrait, RedirectDestinationTrait, UrlGeneratorTrait, StringTranslationTraitclass \Drupal\Core\Entity\EntityForm implements EntityFormInterfaceclass \Drupal\Core\Entity\BundleEntityFormBaseclass \Drupal\taxonomy\VocabularyForm File core/modules/taxonomy/src/VocabularyForm.php, line 15 Name

VocabularyForm::$vocabularyStorage

The vocabulary storage. Type: \Drupal\taxonomy\VocabularyStorageInterface. File core/modules/taxonomy/src/VocabularyForm.php, line 22 Class VocabularyForm Base form for vocabulary edit forms. Namespace Drupal\taxonomy Code protected $vocabularyStorage;