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);
}
doc_Drupal
2016-10-29 09:56:22
Comments
Leave a Comment

Please login to continue.