Commit ad41b6f8 authored by webchick's avatar webchick
Browse files

Issue #2314877 by Crell: Standardize menu link entity route names.

parent de764ba9
menu_link_content.link_edit:
route_name: menu_link_content.link_edit
base_route: menu_link_content.link_edit
entity.menu_link_content.canonical:
route_name: entity.menu_link_content.canonical
base_route: entity.menu_link_content.canonical
title: Edit
......@@ -6,7 +6,7 @@ menu_link_content.link_add:
requirements:
_entity_create_access: 'menu_link_content'
menu_link_content.link_edit:
entity.menu_link_content.canonical:
path: '/admin/structure/menu/item/{menu_link_content}/edit'
defaults:
_entity_form: 'menu_link_content.default'
......@@ -17,7 +17,7 @@ menu_link_content.link_edit:
requirements:
_entity_access: 'menu_link_content.update'
menu_link_content.link_delete:
entity.menu_link_content.delete_form:
path: '/admin/structure/menu/item/{menu_link_content}/delete'
defaults:
_entity_form: 'menu_link_content.delete'
......
......@@ -39,9 +39,9 @@
* "bundle" = "bundle"
* },
* links = {
* "canonical" = "menu_link_content.link_edit",
* "edit-form" = "menu_link_content.link_edit",
* "delete-form" = "menu_link_content.link_delete",
* "canonical" = "entity.menu_link_content.canonical",
* "edit-form" = "entity.menu_link_content.canonical",
* "delete-form" = "entity.menu_link_content.delete_form",
* }
* )
*/
......
......@@ -364,7 +364,7 @@ public function save(array $form, FormStateInterface $form_state) {
if ($saved) {
drupal_set_message($this->t('The menu link has been saved.'));
$form_state['redirect_route'] = array(
'route_name' => 'menu_link_content.link_edit',
'route_name' => 'entity.menu_link_content.canonical',
'route_parameters' => array(
'menu_link_content' => $menu_link->id(),
),
......
......@@ -181,7 +181,7 @@ public function getDescription() {
*/
public function getDeleteRoute() {
return array(
'route_name' => 'menu_link_content.link_delete',
'route_name' => 'entity.menu_link_content.delete_form',
'route_parameters' => array('menu_link_content' => $this->getEntity()->id()),
);
}
......@@ -191,7 +191,7 @@ public function getDeleteRoute() {
*/
public function getEditRoute() {
return array(
'route_name' => 'menu_link_content.link_edit',
'route_name' => 'entity.menu_link_content.canonical',
'route_parameters' => array('menu_link_content' => $this->getEntity()->id()),
);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment