Term::getVocabularyId

public Term::getVocabularyId()

Get the taxonomy vocabulary id this term belongs to.

Return value

int The id of the vocabulary.

Overrides TermInterface::getVocabularyId

File

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

Class

Term
Defines the taxonomy term entity.

Namespace

Drupal\taxonomy\Entity

Code

public function getVocabularyId() {
  return $this->get('vid')->target_id;
}
doc_Drupal
2016-10-29 09:47:02
Comments
Leave a Comment

Please login to continue.