function taxonomy_term_load_multiple

Load multiple taxonomy terms based on certain conditions.

This function should be used whenever you need to load more than one term from the database. Terms are loaded into memory and will not require database access if loaded again during the same page request.

Parameters

array $tids: (optional) An array of entity IDs. If omitted, all entities are loaded.

Return value

array An array of taxonomy term entities, indexed by tid. When no results are found, an empty array is returned.

See also

entity_load_multiple()

Drupal\Core\Entity\Query\EntityQueryInterface

6 calls to taxonomy_term_load_multiple()
LoadMultipleTest::testTaxonomyTermMultipleLoad in drupal/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/LoadMultipleTest.php
Create a vocabulary and some taxonomy terms, ensuring they're loaded correctly using taxonomy_term_load_multiple().
TaxonomyFormatterBase::prepareView in drupal/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/field/formatter/TaxonomyFormatterBase.php
Implements \Drupal\field\Plugin\Type\Formatter\FormatterInterface::prepareView().
taxonomy_field_validate in drupal/core/modules/taxonomy/taxonomy.module
Implements hook_field_validate().
taxonomy_get_tree in drupal/core/modules/taxonomy/taxonomy.module
Create a hierarchical representation of a vocabulary.
taxonomy_term_load_children in drupal/core/modules/taxonomy/taxonomy.module
Finds all children of a term ID.

... See full list

File

drupal/core/modules/taxonomy/taxonomy.module, line 796
Enables the organization of content into categories.

Code

function taxonomy_term_load_multiple(array $tids = NULL) {
  return entity_load_multiple('taxonomy_term', $tids);
}