function TermStorageInterface::getNodeTerms

Same name in other branches
  1. 9 core/modules/taxonomy/src/TermStorageInterface.php \Drupal\taxonomy\TermStorageInterface::getNodeTerms()
  2. 10 core/modules/taxonomy/src/TermStorageInterface.php \Drupal\taxonomy\TermStorageInterface::getNodeTerms()
  3. 11.x core/modules/taxonomy/src/TermStorageInterface.php \Drupal\taxonomy\TermStorageInterface::getNodeTerms()

Returns all terms used to tag some given nodes.

Parameters

array $nids: Node IDs to retrieve terms for.

array $vocabs: (optional) A vocabularies array to restrict the term search. Defaults to empty array.

string $langcode: (optional) A language code to restrict the term search. Defaults to NULL.

Return value

array An array of nids and the term entities they were tagged with.

1 method overrides TermStorageInterface::getNodeTerms()
TermStorage::getNodeTerms in core/modules/taxonomy/src/TermStorage.php
Returns all terms used to tag some given nodes.

File

core/modules/taxonomy/src/TermStorageInterface.php, line 127

Class

TermStorageInterface
Defines an interface for taxonomy_term entity storage classes.

Namespace

Drupal\taxonomy

Code

public function getNodeTerms(array $nids, array $vocabs = [], $langcode = NULL);

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.