function taxonomy_term_load_multiple in Drupal 7
Same name and namespace in other branches
- 8 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.
Parameters
$tids: An array of taxonomy term IDs.
$conditions: (deprecated) An associative array of conditions on the {taxonomy_term} 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.
File
- modules/
taxonomy/ taxonomy.module, line 1327 - Enables the organization of content into categories.
Code
function taxonomy_term_load_multiple($tids = array(), $conditions = array()) {
return entity_load('taxonomy_term', $tids, $conditions);
}