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.
array $tids: (optional) An array of entity IDs. If omitted, all entities are loaded.
array An array of taxonomy term entities, indexed by tid. When no results are found, an empty array is returned.
Drupal\Core\Entity\Query\EntityQueryInterface
function taxonomy_term_load_multiple(array $tids = NULL) {
return entity_load_multiple('taxonomy_term', $tids);
}