diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Controller/TaxonomyController.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Controller/TaxonomyController.php index e79c37ce59f..cf49ec64a5b 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/Controller/TaxonomyController.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Controller/TaxonomyController.php @@ -41,6 +41,20 @@ class TaxonomyController extends ControllerBase { public function termPage(TermInterface $taxonomy_term) { module_load_include('pages.inc', 'taxonomy'); return taxonomy_term_page($taxonomy_term); + + } + + /** + * Route title callback. + * + * @param \Drupal\taxonomy\VocabularyInterface $taxonomy_vocabulary + * The taxonomy term. + * + * @return string + * The term label. + */ + public function vocabularyTitle(VocabularyInterface $taxonomy_vocabulary) { + return Xss::filter($taxonomy_vocabulary->label()); } /** diff --git a/core/modules/taxonomy/taxonomy.module b/core/modules/taxonomy/taxonomy.module index e41b46770f4..fd0834443ab 100644 --- a/core/modules/taxonomy/taxonomy.module +++ b/core/modules/taxonomy/taxonomy.module @@ -252,12 +252,6 @@ function taxonomy_menu() { 'type' => MENU_CALLBACK, ); - $items['admin/structure/taxonomy/manage/%taxonomy_vocabulary'] = array( - 'route_name' => 'taxonomy.overview_terms', - 'title callback' => 'entity_page_label', - 'title arguments' => array(4), - ); - return $items; } diff --git a/core/modules/taxonomy/taxonomy.routing.yml b/core/modules/taxonomy/taxonomy.routing.yml index 804086001a0..b5f3c2e96e4 100644 --- a/core/modules/taxonomy/taxonomy.routing.yml +++ b/core/modules/taxonomy/taxonomy.routing.yml @@ -79,6 +79,7 @@ taxonomy.overview_terms: path: '/admin/structure/taxonomy/manage/{taxonomy_vocabulary}' defaults: _form: 'Drupal\taxonomy\Form\OverviewTerms' + _title_callback: 'Drupal\taxonomy\Controller\TaxonomyController::vocabularyTitle' requirements: _entity_access: 'taxonomy_vocabulary.view'