function VocabularyForm::exists
Same name in other branches
- 9 core/modules/taxonomy/src/VocabularyForm.php \Drupal\taxonomy\VocabularyForm::exists()
- 8.9.x core/modules/taxonomy/src/VocabularyForm.php \Drupal\taxonomy\VocabularyForm::exists()
- 10 core/modules/taxonomy/src/VocabularyForm.php \Drupal\taxonomy\VocabularyForm::exists()
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 176
Class
- VocabularyForm
- Base form for vocabulary edit forms.
Namespace
Drupal\taxonomyCode
public function exists($vid) {
$action = $this->vocabularyStorage
->load($vid);
return !empty($action);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.