TaxonomyController::termTitle

public TaxonomyController::termTitle(TermInterface $taxonomy_term)

Route title callback.

Parameters

\Drupal\taxonomy\TermInterface $taxonomy_term: The taxonomy term.

Return value

array The term label as a render array.

File

core/modules/taxonomy/src/Controller/TaxonomyController.php, line 51

Class

TaxonomyController
Provides route responses for taxonomy.module.

Namespace

Drupal\taxonomy\Controller

Code

public function termTitle(TermInterface $taxonomy_term) {
  return ['#markup' => $taxonomy_term->getName(), '#allowed_tags' => Xss::getHtmlTagList()];
}
doc_Drupal
2016-10-29 09:46:29
Comments
Leave a Comment

Please login to continue.