diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/Menu/LocalAction/VocabularyAdd.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/Menu/LocalAction/VocabularyAdd.php new file mode 100644 index 0000000..0ab8af7 --- /dev/null +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/Menu/LocalAction/VocabularyAdd.php @@ -0,0 +1,24 @@ + language_default()->id, - )); - return Drupal::entityManager()->getForm($vocabulary); -} - -/** * Form builder for the taxonomy terms overview. * * Display a tree of all the terms in a vocabulary, with options to edit diff --git a/core/modules/taxonomy/taxonomy.module b/core/modules/taxonomy/taxonomy.module index 17bbb8c..ef94bf1 100644 --- a/core/modules/taxonomy/taxonomy.module +++ b/core/modules/taxonomy/taxonomy.module @@ -242,11 +242,8 @@ function taxonomy_menu() { ); $items['admin/structure/taxonomy/add'] = array( 'title' => 'Add vocabulary', - 'page callback' => 'taxonomy_vocabulary_add', - 'access callback' => 'entity_page_create_access', - 'access arguments' => array('taxonomy_vocabulary'), - 'type' => MENU_LOCAL_ACTION, - 'file' => 'taxonomy.admin.inc', + 'route_name' => 'taxonomy_vocabulary_add', + 'type' => MENU_SIBLING_LOCAL_TASK, ); $items['taxonomy/term/%taxonomy_term'] = array( diff --git a/core/modules/taxonomy/taxonomy.routing.yml b/core/modules/taxonomy/taxonomy.routing.yml index 09dc6d0..a3bfd3d 100644 --- a/core/modules/taxonomy/taxonomy.routing.yml +++ b/core/modules/taxonomy/taxonomy.routing.yml @@ -19,6 +19,13 @@ taxonomy_term_delete: requirements: _entity_access: 'taxonomy_term.delete' +taxonomy_vocabulary_add: + pattern: '/admin/structure/taxonomy/add' + defaults: + _entity_form: 'taxonomy_vocabulary' + requirements: + _entity_create_access: 'taxonomy_vocabulary' + taxonomy_vocabulary_delete: pattern: '/admin/structure/taxonomy/manage/{taxonomy_vocabulary}/delete' defaults: