function TaxonomyController::vocabularyTitle

Same name 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(),
    ];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.