You are here

public function Term::getVocabularyId in Drupal 8

Gets the ID of the vocabulary that owns the term.

Return value

string The vocabulary ID.

Overrides TermInterface::getVocabularyId

Deprecated

in drupal:8.?.? and is removed from drupal:9.0.0. Use TermInterface::bundle() instead.

File

core/modules/taxonomy/src/Entity/Term.php, line 285

Class

Term
Defines the taxonomy term entity.

Namespace

Drupal\taxonomy\Entity

Code

public function getVocabularyId() {
  @trigger_error('The ' . __METHOD__ . ' method is deprecated since version 8.4.0 and will be removed before 9.0.0. Use ' . __CLASS__ . '::bundle() instead to get the vocabulary ID.', E_USER_DEPRECATED);
  return $this
    ->bundle();
}