function TermStorageInterface::getNodeTerms

Same name in other branches
  1. 9 core/modules/taxonomy/src/TermStorageInterface.php \Drupal\taxonomy\TermStorageInterface::getNodeTerms()
  2. 8.9.x core/modules/taxonomy/src/TermStorageInterface.php \Drupal\taxonomy\TermStorageInterface::getNodeTerms()
  3. 10 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 $vids: (optional) an array of vocabulary IDs 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 103

Class

TermStorageInterface
Defines an interface for taxonomy_term entity storage classes.

Namespace

Drupal\taxonomy

Code

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

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