You are here

public function TaxonomyController::vocabularyTitle in Drupal 8

Same name and namespace in other branches
  1. 9 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.

File

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

Class

TaxonomyController
Provides route responses for taxonomy.module.

Namespace

Drupal\taxonomy\Controller

Code

public function vocabularyTitle(VocabularyInterface $taxonomy_vocabulary) {
  return [
    '#markup' => $taxonomy_vocabulary
      ->label(),
    '#allowed_tags' => Xss::getHtmlTagList(),
  ];
}