8.5.x taxonomy.module taxonomy_term_load_multiple(array $tids = NULL)
8.0.x taxonomy.module taxonomy_term_load_multiple(array $tids = NULL)
8.1.x taxonomy.module taxonomy_term_load_multiple(array $tids = NULL)
8.2.x taxonomy.module taxonomy_term_load_multiple(array $tids = NULL)
8.3.x taxonomy.module taxonomy_term_load_multiple(array $tids = NULL)
8.4.x taxonomy.module taxonomy_term_load_multiple(array $tids = NULL)
8.6.x taxonomy.module taxonomy_term_load_multiple(array $tids = NULL)
7.x taxonomy.module 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.

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.

Deprecated

in Drupal 8.x, will be removed before Drupal 9.0. Use \Drupal\taxonomy\Entity\Term::loadMultiple().

See also

entity_load_multiple()

\Drupal\Core\Entity\Query\EntityQueryInterface

File

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

Code

function taxonomy_term_load_multiple(array $tids = NULL) {
  return Term::loadMultiple($tids);
}