function TaxonomyController::termTitle
Route title callback.
Parameters
\Drupal\taxonomy\TermInterface $taxonomy_term: The taxonomy term.
Return value
array The term label as a render array.
1 string reference to 'TaxonomyController::termTitle'
- taxonomy.routing.yml in core/
modules/ taxonomy/ taxonomy.routing.yml - core/modules/taxonomy/taxonomy.routing.yml
File
-
core/
modules/ taxonomy/ src/ Controller/ TaxonomyController.php, line 38
Class
- TaxonomyController
- Provides route responses for taxonomy.module.
Namespace
Drupal\taxonomy\ControllerCode
public function termTitle(TermInterface $taxonomy_term) {
return [
'#markup' => $taxonomy_term->getName(),
'#allowed_tags' => Xss::getHtmlTagList(),
];
}