8.5.x taxonomy.module taxonomy_term_load($tid)
8.0.x taxonomy.module taxonomy_term_load($tid)
8.1.x taxonomy.module taxonomy_term_load($tid)
8.2.x taxonomy.module taxonomy_term_load($tid)
8.3.x taxonomy.module taxonomy_term_load($tid)
8.4.x taxonomy.module taxonomy_term_load($tid)
8.6.x taxonomy.module taxonomy_term_load($tid)
7.x taxonomy.module taxonomy_term_load($tid)

Return the taxonomy term entity matching a term ID.

Parameters

$tid: A term's ID

Return value

\Drupal\taxonomy\Entity\Term|null A taxonomy term entity, or NULL if the term was not found. Results are statically cached.

Deprecated

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

File

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

Code

function taxonomy_term_load($tid) {
  if (!is_numeric($tid)) {
    return NULL;
  }
  return Term::load($tid);
}