You are here

public function TermStorageInterface::getNodeTerms in Drupal 8

Same name and namespace in other branches
  1. 9 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);