Issue #2181045 by tim.plunkett: Add a title callback for the term overview page.

8.0.x
webchick 2014-01-24 12:00:54 -08:00
parent 854c8661ba
commit 19fa29c37b
3 changed files with 15 additions and 6 deletions

View File

@ -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());
}
/**

View File

@ -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;
}

View File

@ -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'