You are here

public function VocabularyForm::exists in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 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 156
Contains \Drupal\taxonomy\VocabularyForm.

Class

VocabularyForm
Base form for vocabulary edit forms.

Namespace

Drupal\taxonomy

Code

public function exists($vid) {
  $action = $this->vocabularyStorage
    ->load($vid);
  return !empty($action);
}