function taxonomy_term_load_multiple

taxonomy_term_load_multiple($tids = array(), $conditions = array())

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

entity_load()

EntityFieldQuery

File

modules/taxonomy/taxonomy.module, line 1325
Enables the organization of content into categories.

Code

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

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!taxonomy!taxonomy.module/function/taxonomy_term_load_multiple/7.x