Issue #2062769 by dawehner: Convert taxonomy edit form to a route.

8.0.x
Alex Pott 2013-08-28 01:15:09 +01:00
parent a04c933440
commit a19dfc639f
3 changed files with 9 additions and 10 deletions

View File

@ -348,11 +348,6 @@ class TermTest extends TaxonomyTestBase {
// Check that the term feed page is working.
$this->drupalGet('taxonomy/term/' . $term->id() . '/feed');
// Check that the term edit page does not try to interpret additional path
// components as arguments for entity_get_form().
$this->drupalGet('taxonomy/term/' . $term->id() . '/edit/' . $this->randomName());
$this->assertResponse(200, 'The taxonomy term edit menu item ensured appropriate arguments were passed to its page callback.');
// Delete the term.
$this->drupalPost('taxonomy/term/' . $term->id() . '/edit', array(), t('Delete'));
$this->drupalPost(NULL, NULL, t('Delete'));

View File

@ -265,14 +265,11 @@ function taxonomy_menu() {
);
$items['taxonomy/term/%taxonomy_term/edit'] = array(
'title' => 'Edit',
'page callback' => 'entity_get_form',
'page arguments' => array(2, 'default', array()),
'access callback' => 'entity_page_access',
'access arguments' => array(2, 'update'),
'title callback' => 'taxonomy_term_title',
'title arguments' => array(2),
'type' => MENU_LOCAL_TASK,
'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE,
'weight' => 10,
'file' => 'taxonomy.admin.inc',
);
$items['taxonomy/term/%taxonomy_term/delete'] = array(
'title' => 'Delete',

View File

@ -12,6 +12,13 @@ taxonomy_term_add:
requirements:
_access_taxonomy_term_create: 'taxonomy_term'
taxonomy_term_edit:
pattern: '/taxonomy/term/{taxonomy_term}/edit'
defaults:
_entity_form: 'taxonomy_term.default'
requirements:
_entity_access: 'taxonomy_term.update'
taxonomy_term_delete:
pattern: '/taxonomy/term/{taxonomy_term}/delete'
defaults: