Issue #2181045 by tim.plunkett: Add a title callback for the term overview page.
parent
854c8661ba
commit
19fa29c37b
|
@ -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());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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'
|
||||
|
||||
|
|
Loading…
Reference in New Issue