public function TaxonomyController::vocabularyTitle in Drupal 9
Same name and namespace in other branches
- 8 core/modules/taxonomy/src/Controller/TaxonomyController.php \Drupal\taxonomy\Controller\TaxonomyController::vocabularyTitle()
Route title callback.
Parameters
\Drupal\taxonomy\VocabularyInterface $taxonomy_vocabulary: The vocabulary.
Return value
string The vocabulary label as a render array.
Deprecated
in drupal:9.3.0 and is removed from drupal:10.0.0. There is no replacement; route title callbacks are internal.
See also
https://www.drupal.org/project/drupal/issues/3037157
File
- core/
modules/ taxonomy/ src/ Controller/ TaxonomyController.php, line 43
Class
- TaxonomyController
- Provides route responses for taxonomy.module.
Namespace
Drupal\taxonomy\ControllerCode
public function vocabularyTitle(VocabularyInterface $taxonomy_vocabulary) {
@trigger_error(__METHOD__ . ' is deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. There is no replacement; route title callbacks are internal. See https://www.drupal.org/project/drupal/issues/3037157.', E_USER_DEPRECATED);
return [
'#markup' => $taxonomy_vocabulary
->label(),
'#allowed_tags' => Xss::getHtmlTagList(),
];
}