You are here

function taxonomy_term_title in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/taxonomy/taxonomy.module \taxonomy_term_title()
  2. 7 modules/taxonomy/taxonomy.module \taxonomy_term_title()

Title callback for term pages.

Parameters

\Drupal\taxonomy\Entity\Term $term: A taxonomy term entity.

Return value

The term name to be used as the page title.

Deprecated

in drupal:9.3.0 and is removed from drupal:10.0.0. Use $term->label() instead.

See also

https://www.drupal.org/node/3039041

1 call to taxonomy_term_title()
TaxonomyDeprecationTest::testTaxonomyDeprecations in core/modules/taxonomy/tests/src/Kernel/TaxonomyDeprecationTest.php

File

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

Code

function taxonomy_term_title(Term $term) {
  @trigger_error('taxonomy_term_title() is deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use $term->label() instead. See https://www.drupal.org/node/3039041', E_USER_DEPRECATED);
  return $term
    ->label();
}