diff --git a/core/modules/shortcut/shortcut.links.action.yml b/core/modules/shortcut/shortcut.links.action.yml index 3ed4a7589c1ada6eeec0a4724cc85de091fe5745..05b431acfc4b3989e94e5b184e7a69af47933e56 100644 --- a/core/modules/shortcut/shortcut.links.action.yml +++ b/core/modules/shortcut/shortcut.links.action.yml @@ -7,4 +7,4 @@ shortcut.link_add: route_name: shortcut.link_add title: 'Add shortcut' appears_on: - - shortcut.set_customize + - entity.shortcut_set.customize_form diff --git a/core/modules/shortcut/shortcut.links.task.yml b/core/modules/shortcut/shortcut.links.task.yml index f3915834076c147ae7604c1120245daf1d29db18..cee1c8511cfe399dc97e01c470a1c899d9b216c9 100644 --- a/core/modules/shortcut/shortcut.links.task.yml +++ b/core/modules/shortcut/shortcut.links.task.yml @@ -3,12 +3,12 @@ shortcut.set_switch: base_route: user.view title: 'Shortcuts' -shortcut.set_customize: +entity.shortcut_set.customize_form: title: 'List links' - route_name: shortcut.set_customize - base_route: shortcut.set_customize -shortcut.set_edit: + route_name: entity.shortcut_set.customize_form + base_route: entity.shortcut_set.customize_form +entity.shortcut_set.edit_form: title: 'Edit set name' - route_name: shortcut.set_edit - base_route: shortcut.set_customize + route_name: entity.shortcut_set.edit_form + base_route: entity.shortcut_set.customize_form weight: 10 diff --git a/core/modules/shortcut/shortcut.module b/core/modules/shortcut/shortcut.module index e433c82617c24ab90af5415d07f150b429692c3b..f5a2fba442b7126fae0066e95858fa680827794f 100644 --- a/core/modules/shortcut/shortcut.module +++ b/core/modules/shortcut/shortcut.module @@ -35,7 +35,7 @@ function shortcut_help($route_name, RouteMatchInterface $route_match) { case 'shortcut.set_admin': case 'shortcut.set_add': - case 'shortcut.set_edit': + case 'entity.shortcut_set.edit_form': $user = \Drupal::currentUser(); if ($user->hasPermission('access shortcuts') && $user->hasPermission('switch shortcut sets')) { $output = '<p>' . t('Define which shortcut set you are using on the <a href="@shortcut-link">Shortcuts tab</a> of your account page.', array('@shortcut-link' => url("user/{$user->id()}/shortcuts"))) . '</p>'; @@ -381,7 +381,7 @@ function shortcut_preprocess_page(&$variables) { else { $query['id'] = $shortcut_id; $link_text = shortcut_set_switch_access() ? t('Remove from %shortcut_set shortcuts', array('%shortcut_set' => $shortcut_set->label())) : t('Remove from shortcuts'); - $route_name = 'shortcut.link_delete'; + $route_name = 'entity.shortcut.delete_form'; $route_parameters = array('shortcut' => $shortcut_id); } @@ -419,7 +419,7 @@ function shortcut_toolbar() { $configure_link = array( '#type' => 'link', '#title' => t('Edit shortcuts'), - '#route_name' => 'shortcut.set_customize', + '#route_name' => 'entity.shortcut_set.customize_form', '#route_parameters' => array('shortcut_set' => $shortcut_set->id()), '#options' => array('attributes' => array('class' => array('edit-shortcuts'))), ); diff --git a/core/modules/shortcut/shortcut.routing.yml b/core/modules/shortcut/shortcut.routing.yml index 9aad750ba3f49dff06087f44ecc21ed8e19cfdca..90752cd17f29ab6a98620a7671b5dcb72e1a7930 100644 --- a/core/modules/shortcut/shortcut.routing.yml +++ b/core/modules/shortcut/shortcut.routing.yml @@ -1,4 +1,4 @@ -shortcut.set_delete: +entity.shortcut_set.delete_form: path: '/admin/config/user-interface/shortcut/manage/{shortcut_set}/delete' defaults: _entity_form: 'shortcut_set.delete' @@ -22,7 +22,7 @@ shortcut.set_add: requirements: _entity_create_access: 'shortcut_set' -shortcut.set_edit: +entity.shortcut_set.edit_form: path: '/admin/config/user-interface/shortcut/manage/{shortcut_set}' defaults: _entity_form: 'shortcut_set.edit' @@ -38,7 +38,7 @@ shortcut.link_add_inline: _entity_access: 'shortcut_set.update' _csrf_token: 'TRUE' -shortcut.set_customize: +entity.shortcut_set.customize_form: path: '/admin/config/user-interface/shortcut/manage/{shortcut_set}/customize' defaults: _entity_form: 'shortcut_set.customize' @@ -54,7 +54,7 @@ shortcut.link_add: requirements: _entity_create_access: 'shortcut:{shortcut_set}' -shortcut.link_edit: +entity.shortcut.canonical: path: '/admin/config/user-interface/shortcut/link/{shortcut}' defaults: _entity_form: 'shortcut.default' @@ -62,7 +62,7 @@ shortcut.link_edit: requirements: _entity_access: 'shortcut.update' -shortcut.link_delete: +entity.shortcut.delete_form: path: '/admin/config/user-interface/shortcut/link/{shortcut}/delete' defaults: _entity_form: 'shortcut.delete' diff --git a/core/modules/shortcut/src/Entity/Shortcut.php b/core/modules/shortcut/src/Entity/Shortcut.php index 463a9a09c8b0aa13eae927b825d735f97d2072a5..4fd0ce668eed92aad8f764f7430aac58d330bcc7 100644 --- a/core/modules/shortcut/src/Entity/Shortcut.php +++ b/core/modules/shortcut/src/Entity/Shortcut.php @@ -41,10 +41,10 @@ * "label" = "title" * }, * links = { - * "canonical" = "shortcut.link_edit", - * "delete-form" = "shortcut.link_delete", - * "edit-form" = "shortcut.link_edit", - * "admin-form" = "shortcut.link_edit" + * "canonical" = "entity.shortcut.canonical", + * "delete-form" = "entity.shortcut.delete_form", + * "edit-form" = "entity.shortcut.canonical", + * "admin-form" = "entity.shortcut.canonical" * }, * bundle_entity_type = "shortcut_set" * ) diff --git a/core/modules/shortcut/src/Entity/ShortcutSet.php b/core/modules/shortcut/src/Entity/ShortcutSet.php index b1b0fd7603190b6495aad83f2d19562ef24c8808..473809beeda024c122e17478b20ba0973146c073 100644 --- a/core/modules/shortcut/src/Entity/ShortcutSet.php +++ b/core/modules/shortcut/src/Entity/ShortcutSet.php @@ -35,9 +35,9 @@ * "label" = "label" * }, * links = { - * "customize-form" = "shortcut.set_customize", - * "delete-form" = "shortcut.set_delete", - * "edit-form" = "shortcut.set_edit" + * "customize-form" = "entity.shortcut_set.customize_form", + * "delete-form" = "entity.shortcut_set.delete_form", + * "edit-form" = "entity.shortcut_set.edit_form" * } * ) */ diff --git a/core/modules/shortcut/src/Form/ShortcutDeleteForm.php b/core/modules/shortcut/src/Form/ShortcutDeleteForm.php index 0256017dd50e239d9e7d81f4740575e21671a48d..b51dca85c0cca8648ef3c0936cf6b79be3de9931 100644 --- a/core/modules/shortcut/src/Form/ShortcutDeleteForm.php +++ b/core/modules/shortcut/src/Form/ShortcutDeleteForm.php @@ -34,7 +34,7 @@ public function getQuestion() { * {@inheritdoc} */ public function getCancelUrl() { - return new Url('shortcut.set_customize', array( + return new Url('entity.shortcut_set.customize_form', array( 'shortcut_set' => $this->entity->bundle(), )); } diff --git a/core/modules/shortcut/src/Form/SwitchShortcutSet.php b/core/modules/shortcut/src/Form/SwitchShortcutSet.php index 75fcb4e64936d2fb0e480837be15d41c8e63c2ae..462cf4017c9e4baa80dc302c40d26abcc5b0b022 100644 --- a/core/modules/shortcut/src/Form/SwitchShortcutSet.php +++ b/core/modules/shortcut/src/Form/SwitchShortcutSet.php @@ -212,7 +212,7 @@ public function submitForm(array &$form, FormStateInterface $form_state) { drupal_set_message($this->t('%user is now using a new shortcut set called %set_name. You can edit it from this page.', $replacements)); } $form_state['redirect_route'] = array( - 'route_name' => 'shortcut.set_customize', + 'route_name' => 'entity.shortcut_set.customize_form', 'route_parameters' => array( 'shortcut_set' => $set->id(), ), diff --git a/core/modules/shortcut/src/ShortcutForm.php b/core/modules/shortcut/src/ShortcutForm.php index c72e58257aa1262330caac20921076b0cfeab3d0..d5cb017d5b4236dfb55aeeead0814f5863be7a6b 100644 --- a/core/modules/shortcut/src/ShortcutForm.php +++ b/core/modules/shortcut/src/ShortcutForm.php @@ -88,7 +88,7 @@ public function save(array $form, FormStateInterface $form_state) { drupal_set_message($message); $form_state['redirect_route'] = array( - 'route_name' => 'shortcut.set_customize', + 'route_name' => 'entity.shortcut_set.customize_form', 'route_parameters' => array('shortcut_set' => $entity->bundle()), ); }