function taxonomy_term_load_multiple

Same name and namespace in other branches
  1. 8.9.x core/modules/taxonomy/taxonomy.module \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.

@todo Remove $conditions in Drupal 8.


$tids: An array of taxonomy term IDs.

$conditions: (deprecated) An associative array of conditions on the {taxonomy_term_data} table, where the keys are the database fields and the values are the values those fields must have. Instead, it is preferable to use EntityFieldQuery to retrieve a list of entity IDs loadable by this function.

Return value

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

See also



12 calls to taxonomy_term_load_multiple()
hook_field_formatter_prepare_view in modules/field/field.api.php
Allow formatters to load information for field values being displayed.
MenuBreadcrumbTestCase::testBreadCrumbs in modules/simpletest/tests/menu.test
Tests breadcrumbs on node and administrative paths.
TaxonomyLoadMultipleTestCase::testTaxonomyTermMultipleLoad in modules/taxonomy/taxonomy.test
Create a vocabulary and some taxonomy terms, ensuring they're loaded correctly using taxonomy_term_load_multiple().
TaxonomyTermFunctionTestCase::testTermDelete in modules/taxonomy/taxonomy.test
taxonomy_autocomplete_validate in modules/taxonomy/taxonomy.module
Form element validate handler for taxonomy term autocomplete element.

... See full list


modules/taxonomy/taxonomy.module, line 1327


function taxonomy_term_load_multiple($tids = array(), $conditions = array()) {
    return entity_load('taxonomy_term', $tids, $conditions);

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