Issue #2062769 by dawehner: Convert taxonomy edit form to a route.
parent
a04c933440
commit
a19dfc639f
|
@ -348,11 +348,6 @@ class TermTest extends TaxonomyTestBase {
|
||||||
// Check that the term feed page is working.
|
// Check that the term feed page is working.
|
||||||
$this->drupalGet('taxonomy/term/' . $term->id() . '/feed');
|
$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.
|
// Delete the term.
|
||||||
$this->drupalPost('taxonomy/term/' . $term->id() . '/edit', array(), t('Delete'));
|
$this->drupalPost('taxonomy/term/' . $term->id() . '/edit', array(), t('Delete'));
|
||||||
$this->drupalPost(NULL, NULL, t('Delete'));
|
$this->drupalPost(NULL, NULL, t('Delete'));
|
||||||
|
|
|
@ -265,14 +265,11 @@ function taxonomy_menu() {
|
||||||
);
|
);
|
||||||
$items['taxonomy/term/%taxonomy_term/edit'] = array(
|
$items['taxonomy/term/%taxonomy_term/edit'] = array(
|
||||||
'title' => 'Edit',
|
'title' => 'Edit',
|
||||||
'page callback' => 'entity_get_form',
|
'title callback' => 'taxonomy_term_title',
|
||||||
'page arguments' => array(2, 'default', array()),
|
'title arguments' => array(2),
|
||||||
'access callback' => 'entity_page_access',
|
|
||||||
'access arguments' => array(2, 'update'),
|
|
||||||
'type' => MENU_LOCAL_TASK,
|
'type' => MENU_LOCAL_TASK,
|
||||||
'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE,
|
'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE,
|
||||||
'weight' => 10,
|
'weight' => 10,
|
||||||
'file' => 'taxonomy.admin.inc',
|
|
||||||
);
|
);
|
||||||
$items['taxonomy/term/%taxonomy_term/delete'] = array(
|
$items['taxonomy/term/%taxonomy_term/delete'] = array(
|
||||||
'title' => 'Delete',
|
'title' => 'Delete',
|
||||||
|
|
|
@ -12,6 +12,13 @@ taxonomy_term_add:
|
||||||
requirements:
|
requirements:
|
||||||
_access_taxonomy_term_create: 'taxonomy_term'
|
_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:
|
taxonomy_term_delete:
|
||||||
pattern: '/taxonomy/term/{taxonomy_term}/delete'
|
pattern: '/taxonomy/term/{taxonomy_term}/delete'
|
||||||
defaults:
|
defaults:
|
||||||
|
|
Loading…
Reference in New Issue