diff --git a/core/lib/Drupal/Core/Entity/Entity.php b/core/lib/Drupal/Core/Entity/Entity.php index 08c35c7a41ec41795f7c97cea6ae07250e796127..afdfcb04f1f10d44460ced4bd60636718dadfef9 100644 --- a/core/lib/Drupal/Core/Entity/Entity.php +++ b/core/lib/Drupal/Core/Entity/Entity.php @@ -274,9 +274,12 @@ public function url($rel = 'canonical', $options = array()) { * An array of URI placeholders. */ protected function urlRouteParameters($rel) { - // The entity ID is needed as a route parameter. - $uri_route_parameters[$this->getEntityTypeId()] = $this->id(); + $uri_route_parameters = []; + if ($rel != 'collection') { + // The entity ID is needed as a route parameter. + $uri_route_parameters[$this->getEntityTypeId()] = $this->id(); + } return $uri_route_parameters; } diff --git a/core/lib/Drupal/Core/Utility/LinkGeneratorInterface.php b/core/lib/Drupal/Core/Utility/LinkGeneratorInterface.php index ba4719784865d18c5d1ba9f876c206cf774b79d1..ef47ef55a97af7db680f5142dfa4a66411bd2c60 100644 --- a/core/lib/Drupal/Core/Utility/LinkGeneratorInterface.php +++ b/core/lib/Drupal/Core/Utility/LinkGeneratorInterface.php @@ -21,7 +21,7 @@ interface LinkGeneratorInterface { * However, for links enclosed in translatable text you should use t() and * embed the HTML anchor tag directly in the translated string. For example: * @code - * t('Visit the content types page', array('@url' => \Drupal::url('node.overview_types'))); + * t('Visit the content types page', array('@url' => \Drupal::url('entity.node_type.collection'))); * @endcode * This keeps the context of the link title ('settings' in the example) for * translators. diff --git a/core/modules/action/action.info.yml b/core/modules/action/action.info.yml index e99997d63664c6d23d27a34fba8f058ddb00424d..7559efbcb2971d0614606538d6335b5b77f7193f 100644 --- a/core/modules/action/action.info.yml +++ b/core/modules/action/action.info.yml @@ -4,4 +4,4 @@ description: 'Perform tasks on specific events triggered within the system.' package: Core version: VERSION core: 8.x -configure: action.admin +configure: entity.action.collection diff --git a/core/modules/action/action.links.menu.yml b/core/modules/action/action.links.menu.yml index fa5695125daa0ccffe302eeeb14e34f61e65dce5..cd18014e7487c86dc8add236573b540c2800a5b0 100644 --- a/core/modules/action/action.links.menu.yml +++ b/core/modules/action/action.links.menu.yml @@ -1,5 +1,5 @@ action.admin: title: Actions description: 'Manage the actions defined for your site.' - route_name: action.admin + route_name: entity.action.collection parent: system.admin_config_system diff --git a/core/modules/action/action.links.task.yml b/core/modules/action/action.links.task.yml index 0ca44138bf3b37453a15ee24f1c373bef04b056d..5a6a6e6984e3a420faece3bbeb6d8631c8fb0219 100644 --- a/core/modules/action/action.links.task.yml +++ b/core/modules/action/action.links.task.yml @@ -1,4 +1,4 @@ action.admin: - route_name: action.admin + route_name: entity.action.collection title: 'Manage actions' - base_route: action.admin + base_route: entity.action.collection diff --git a/core/modules/action/action.module b/core/modules/action/action.module index 22138ae1b8e61fb34b40ce2c22c933e6c1ecb569..2fb412a34b0afdb5107ba2ee8319c26c833896de 100644 --- a/core/modules/action/action.module +++ b/core/modules/action/action.module @@ -19,13 +19,13 @@ function action_help($route_name, RouteMatchInterface $route_match) { $output .= '
' . t('There are two types of actions: simple and advanced. Simple actions do not require any additional configuration and are listed here automatically. Advanced actions need to be created and configured before they can be used because they have options that need to be specified; for example, sending an email to a specified address or unpublishing content containing certain words. To create an advanced action, select the action from the drop-down list in the advanced action section below and click the Create button.') . '
'; return $output; @@ -45,5 +45,6 @@ function action_entity_type_build(array &$entity_types) { ->setFormClass('delete', 'Drupal\action\Form\ActionDeleteForm') ->setListBuilderClass('Drupal\action\ActionListBuilder') ->setLinkTemplate('delete-form', '/admin/config/system/actions/configure/{action}/delete') - ->setLinkTemplate('edit-form', '/admin/config/system/actions/configure/{action}'); + ->setLinkTemplate('edit-form', '/admin/config/system/actions/configure/{action}') + ->setLinkTemplate('collection', '/admin/config/system/actions'); } diff --git a/core/modules/action/action.routing.yml b/core/modules/action/action.routing.yml index c75ff23e31d66d83685601843a0434720909d74c..acb533acb9dace9018396cb6ed5dfb90c7e104fd 100644 --- a/core/modules/action/action.routing.yml +++ b/core/modules/action/action.routing.yml @@ -1,4 +1,4 @@ -action.admin: +entity.action.collection: path: '/admin/config/system/actions' defaults: _title: 'Actions' diff --git a/core/modules/action/src/ActionFormBase.php b/core/modules/action/src/ActionFormBase.php index e6f0c9152b41f137e6af0aba20de62fa3d1627d5..96bb63d0636078eb66268f497d99ff8f00f6cbad 100644 --- a/core/modules/action/src/ActionFormBase.php +++ b/core/modules/action/src/ActionFormBase.php @@ -149,7 +149,7 @@ public function save(array $form, FormStateInterface $form_state) { $this->entity->save(); drupal_set_message($this->t('The action has been successfully saved.')); - $form_state->setRedirect('action.admin'); + $form_state->setRedirect('entity.action.collection'); } } diff --git a/core/modules/action/src/Form/ActionDeleteForm.php b/core/modules/action/src/Form/ActionDeleteForm.php index 86e5eefb978faf1f79c76a6c639f69e112ec54e3..93e47abde9eda9d4073bd15ed49b905ca8b9b5fd 100644 --- a/core/modules/action/src/Form/ActionDeleteForm.php +++ b/core/modules/action/src/Form/ActionDeleteForm.php @@ -34,7 +34,7 @@ public function getConfirmText() { * {@inheritdoc} */ public function getCancelUrl() { - return new Url('action.admin'); + return new Url('entity.action.collection'); } /** diff --git a/core/modules/action/tests/src/Unit/Menu/ActionLocalTasksTest.php b/core/modules/action/tests/src/Unit/Menu/ActionLocalTasksTest.php index 2aa448b0d2ac01f4f9ee5d23ff14b4efacf2a0e8..e69ba71e80faf4ebb464560562416cd8259ed78f 100644 --- a/core/modules/action/tests/src/Unit/Menu/ActionLocalTasksTest.php +++ b/core/modules/action/tests/src/Unit/Menu/ActionLocalTasksTest.php @@ -25,7 +25,7 @@ protected function setUp() { * Tests local task existence. */ public function testActionLocalTasks() { - $this->assertLocalTasks('action.admin', array(array('action.admin'))); + $this->assertLocalTasks('entity.action.collection', array(array('action.admin'))); } } diff --git a/core/modules/block_content/block_content.info.yml b/core/modules/block_content/block_content.info.yml index e9e7afbf13fe979b9e4d7063edbecfcff16b87df..d32bda79aabe415f0eda034b6009482a1d0f3c23 100644 --- a/core/modules/block_content/block_content.info.yml +++ b/core/modules/block_content/block_content.info.yml @@ -7,4 +7,4 @@ core: 8.x dependencies: - block - text -configure: block_content.list +configure: entity.block_content.collection diff --git a/core/modules/block_content/block_content.links.action.yml b/core/modules/block_content/block_content.links.action.yml index 735e3747722a147429caf78ea8b79e8cf5f06dcb..d94ca3fc495c8bd0caaa2b034d9cd6003eacb161 100644 --- a/core/modules/block_content/block_content.links.action.yml +++ b/core/modules/block_content/block_content.links.action.yml @@ -2,7 +2,7 @@ block_content_type_add: route_name: block_content.type_add title: 'Add custom block type' appears_on: - - block_content.type_list + - entity.block_content_type.collection block_content_add_action: route_name: block_content.add_page @@ -10,5 +10,5 @@ block_content_add_action: appears_on: - block.admin_display - block.admin_display_theme - - block_content.list + - entity.block_content.collection class: \Drupal\block_content\Plugin\Menu\LocalAction\BlockContentAddLocalAction diff --git a/core/modules/block_content/block_content.links.task.yml b/core/modules/block_content/block_content.links.task.yml index bc29ba65360f74b947cd885d6e7236e3b46b6395..2b881713144484b91289f41e0be719c7c9c50045 100644 --- a/core/modules/block_content/block_content.links.task.yml +++ b/core/modules/block_content/block_content.links.task.yml @@ -1,15 +1,15 @@ -block_content.list: +entity.block_content.collection: title: 'Custom block library' - route_name: block_content.list + route_name: entity.block_content.collection base_route: block.admin_display block_content.list_sub: title: Blocks - route_name: block_content.list - parent_id: block_content.list -block_content.type_list: + route_name: entity.block_content.collection + parent_id: entity.block_content.collection +entity.block_content_type.collection: title: Types - route_name: block_content.type_list - parent_id: block_content.list + route_name: entity.block_content_type.collection + parent_id: entity.block_content.collection weight: 1 entity.block_content.canonical: diff --git a/core/modules/block_content/block_content.module b/core/modules/block_content/block_content.module index ac45e62c1a50a5cad8b041f189d1598defb0e741..1a6487872af1f3eab69295701bc373211d35c69e 100644 --- a/core/modules/block_content/block_content.module +++ b/core/modules/block_content/block_content.module @@ -17,21 +17,21 @@ function block_content_help($route_name, RouteMatchInterface $route_match) { case 'help.page.block_content': $output = ''; $output .= '' . t('The Custom Block module allows you to create blocks of content, which can be placed in regions throughout the website. Custom blocks can have fields; see the Field module help for more information. Once created, custom blocks can be placed like blocks provided by other modules; see the Block module help page for details. For more information, see the online documentation for the Custom Block module.', array('!block-content' => \Drupal::url('block_content.list'), '!field-help' => \Drupal::url('help.page', array('name' => 'field')), '!blocks' => \Drupal::url('help.page', array('name' => 'block')), '!online-help' => 'https://drupal.org/documentation/modules/block_content')) . '
'; + $output .= '' . t('The Custom Block module allows you to create blocks of content, which can be placed in regions throughout the website. Custom blocks can have fields; see the Field module help for more information. Once created, custom blocks can be placed like blocks provided by other modules; see the Block module help page for details. For more information, see the online documentation for the Custom Block module.', array('!block-content' => \Drupal::url('entity.block_content.collection'), '!field-help' => \Drupal::url('help.page', array('name' => 'field')), '!blocks' => \Drupal::url('help.page', array('name' => 'block')), '!online-help' => 'https://drupal.org/documentation/modules/block_content')) . '
'; $output .= '' . t('This page lists user-created blocks. These blocks are derived from block types. A block type can consist of different fields and display settings. From the block types tab you can manage these fields as well as create new block types.') . '
'; return $output; - case 'block_content.type_list': + case 'entity.block_content_type.collection': $output = '' . t('This page lists block types. A block type can consist of different fields and display settings. From here you can manage these fields as well as create new block types.') . '
'; return $output; diff --git a/core/modules/block_content/block_content.routing.yml b/core/modules/block_content/block_content.routing.yml index 6ab793751c52b64036f61dfdbf04065756601872..1c78f0cb9e39aa7882bc252a79837da31cc52e10 100644 --- a/core/modules/block_content/block_content.routing.yml +++ b/core/modules/block_content/block_content.routing.yml @@ -1,4 +1,4 @@ -block_content.type_list: +entity.block_content_type.collection: path: '/admin/structure/block/block-content/types' defaults: _entity_list: 'block_content_type' @@ -80,7 +80,7 @@ entity.block_content_type.edit_form: requirements: _entity_access: 'block_content_type.update' -block_content.list: +entity.block_content.collection: path: '/admin/structure/block/block-content' defaults: _title: 'Custom block library' diff --git a/core/modules/block_content/src/BlockContentForm.php b/core/modules/block_content/src/BlockContentForm.php index 994d956f2f05cf6107cb8b3c4f660677915f3294..1b81be23376486252108da0bb7477f3398c2637d 100644 --- a/core/modules/block_content/src/BlockContentForm.php +++ b/core/modules/block_content/src/BlockContentForm.php @@ -198,7 +198,7 @@ public function save(array $form, FormStateInterface $form_state) { ); } else { - $form_state->setRedirect('block_content.list'); + $form_state->setRedirectUrl($block->urlInfo('collection')); } } else { diff --git a/core/modules/block_content/src/BlockContentTypeForm.php b/core/modules/block_content/src/BlockContentTypeForm.php index 7e18e397bb5a438a635c086e8043a2a2649d7976..c0f9ec53e3df83dbfe3d88007342e211e48b0d6f 100644 --- a/core/modules/block_content/src/BlockContentTypeForm.php +++ b/core/modules/block_content/src/BlockContentTypeForm.php @@ -108,7 +108,7 @@ public function save(array $form, FormStateInterface $form_state) { $logger->notice('Custom block type %label has been added.', array('%label' => $block_type->label(), 'link' => $edit_link)); } - $form_state->setRedirect('block_content.type_list'); + $form_state->setRedirectUrl($this->entity->urlInfo('collection')); } } diff --git a/core/modules/block_content/src/Entity/BlockContent.php b/core/modules/block_content/src/Entity/BlockContent.php index f3c47671766d0ccb8f86737d216bd4cebc907539..ef48ac6c5b2e6f34584eb6fca433615928b088a2 100644 --- a/core/modules/block_content/src/Entity/BlockContent.php +++ b/core/modules/block_content/src/Entity/BlockContent.php @@ -42,6 +42,7 @@ * "canonical" = "/block/{block_content}", * "delete-form" = "/block/{block_content}/delete", * "edit-form" = "/block/{block_content}", + * "collection" = "/admin/structure/block/block-content", * }, * translatable = TRUE, * entity_keys = { diff --git a/core/modules/block_content/src/Entity/BlockContentType.php b/core/modules/block_content/src/Entity/BlockContentType.php index 586cc1ea69a9a55f03144b8cda2384342eb78bc5..81b64e90491ab109e87c8ac774ba65fd59c79b88 100644 --- a/core/modules/block_content/src/Entity/BlockContentType.php +++ b/core/modules/block_content/src/Entity/BlockContentType.php @@ -36,7 +36,8 @@ * }, * links = { * "delete-form" = "/admin/structure/block/block-content/manage/{block_content_type}/delete", - * "edit-form" = "/admin/structure/block/block-content/manage/{block_content_type}" + * "edit-form" = "/admin/structure/block/block-content/manage/{block_content_type}", + * "collection" = "/admin/structure/block/block-content/types", * } * ) */ diff --git a/core/modules/block_content/src/Form/BlockContentDeleteForm.php b/core/modules/block_content/src/Form/BlockContentDeleteForm.php index 26e55f4cddcd8297d34c114126005f7a5bdf1708..0778ee286e489436e29e3370904be39d5e9fa1ab 100644 --- a/core/modules/block_content/src/Form/BlockContentDeleteForm.php +++ b/core/modules/block_content/src/Form/BlockContentDeleteForm.php @@ -58,7 +58,7 @@ public function submitForm(array &$form, FormStateInterface $form_state) { $this->entity->delete(); drupal_set_message($this->t('Custom block %label has been deleted.', array('%label' => $this->entity->label()))); $this->logger('block_content')->notice('Custom block %label has been deleted.', array('%label' => $this->entity->label())); - $form_state->setRedirect('block_content.list'); + $form_state->setRedirectUrl($this->entity->urlInfo('collection')); } } diff --git a/core/modules/block_content/src/Form/BlockContentTypeDeleteForm.php b/core/modules/block_content/src/Form/BlockContentTypeDeleteForm.php index 4c7d909464c15dad7549224a595c8b000f5b70c8..9b07b96c3954597bb414ed4179171f110e7af6d5 100644 --- a/core/modules/block_content/src/Form/BlockContentTypeDeleteForm.php +++ b/core/modules/block_content/src/Form/BlockContentTypeDeleteForm.php @@ -55,7 +55,7 @@ public function getQuestion() { * {@inheritdoc} */ public function getCancelUrl() { - return new Url('block_content.type_list'); + return $this->entity->urlInfo('collection'); } /** diff --git a/core/modules/block_content/src/Plugin/Menu/LocalAction/BlockContentAddLocalAction.php b/core/modules/block_content/src/Plugin/Menu/LocalAction/BlockContentAddLocalAction.php index 1cf3bdcd30c3e7238a4be9802d2b6b442460dd01..86921ec19d40b5da5710d89d87575c1190fca440 100644 --- a/core/modules/block_content/src/Plugin/Menu/LocalAction/BlockContentAddLocalAction.php +++ b/core/modules/block_content/src/Plugin/Menu/LocalAction/BlockContentAddLocalAction.php @@ -25,7 +25,7 @@ public function getOptions(RouteMatchInterface $route_match) { $options['query']['theme'] = $theme; } // Adds a destination on custom block listing. - if ($route_match->getRouteName() == 'block_content.list') { + if ($route_match->getRouteName() == 'entity.block_content.collection') { $options['query']['destination'] = 'admin/structure/block/block-content'; } return $options; diff --git a/core/modules/block_content/src/Tests/BlockContentTypeTest.php b/core/modules/block_content/src/Tests/BlockContentTypeTest.php index 60f12100373f0e4dfc87536140699920679b58fd..d59a25d82c7309668db8f09ea4e48debc1db5146 100644 --- a/core/modules/block_content/src/Tests/BlockContentTypeTest.php +++ b/core/modules/block_content/src/Tests/BlockContentTypeTest.php @@ -197,7 +197,7 @@ public function testsBlockContentAddTypes() { $this->drupalPostForm(NULL, $edit, t('Save')); $blocks = $storage->loadByProperties(array('info' => $edit['info[0][value]'])); if (!empty($blocks)) { - $this->assertUrl(\Drupal::url('block_content.list', array(), array('absolute' => TRUE))); + $this->assertUrl(\Drupal::url('entity.block_content.collection', array(), array('absolute' => TRUE))); } else { $this->fail('Could not load created block.'); diff --git a/core/modules/block_content/tests/src/Unit/Menu/BlockContentLocalTasksTest.php b/core/modules/block_content/tests/src/Unit/Menu/BlockContentLocalTasksTest.php index 7f95e6b327540096ea226d168441037a9caca2a8..83cbcf8033535fe054b8cbde2d0ae3a363efe8fe 100644 --- a/core/modules/block_content/tests/src/Unit/Menu/BlockContentLocalTasksTest.php +++ b/core/modules/block_content/tests/src/Unit/Menu/BlockContentLocalTasksTest.php @@ -64,11 +64,11 @@ public function testBlockContentListLocalTasks($route) { $this->assertLocalTasks($route, array( 0 => array( 'block.admin_display', - 'block_content.list', + 'entity.block_content.collection', ), 1 => array( 'block_content.list_sub', - 'block_content.type_list', + 'entity.block_content_type.collection', ), )); } @@ -78,7 +78,7 @@ public function testBlockContentListLocalTasks($route) { */ public function getBlockContentListingRoutes() { return array( - array('block_content.list', 'block_content.type_list'), + array('entity.block_content.collection', 'entity.block_content_type.collection'), ); } diff --git a/core/modules/comment/comment.links.action.yml b/core/modules/comment/comment.links.action.yml index fc97d2d24ec62f1533a3d75296cead5e04ceea22..6cd1f8b2af1b397c31d42a748af92357455bb9ae 100644 --- a/core/modules/comment/comment.links.action.yml +++ b/core/modules/comment/comment.links.action.yml @@ -2,4 +2,4 @@ comment_type_add: route_name: entity.comment_type.add_form title: 'Add comment type' appears_on: - - comment.type_list + - entity.comment_type.collection diff --git a/core/modules/comment/comment.links.menu.yml b/core/modules/comment/comment.links.menu.yml index e4d4488b58bcd595d77224edce4aa613f9b568e2..8c81e68ba4ea476894b2faec29f64b24344f9768 100644 --- a/core/modules/comment/comment.links.menu.yml +++ b/core/modules/comment/comment.links.menu.yml @@ -3,8 +3,8 @@ comment.admin: route_name: comment.admin parent: system.admin_content description: 'List and edit site comments and the comment approval queue.' -comment.type_list: +entity.comment_type.collection: title: 'Comment types' - route_name: comment.type_list + route_name: entity.comment_type.collection parent: system.admin_structure description: 'Manage form and displays settings of comments.' diff --git a/core/modules/comment/comment.module b/core/modules/comment/comment.module index 32a6e321e51a552d80fa82bb53a1455e1a96c41e..163b13a4c49a82af1b7337b846cf5b852ef32277 100644 --- a/core/modules/comment/comment.module +++ b/core/modules/comment/comment.module @@ -69,7 +69,7 @@ function comment_help($route_name, RouteMatchInterface $route_match) { $output .= '' . t('This page provides a list of all comment types on the site and allows you to manage the fields, form and display settings for each.') . '
'; return $output; } diff --git a/core/modules/comment/comment.routing.yml b/core/modules/comment/comment.routing.yml index 521138746bc0e0048f66f27fdb08bc1b427899cf..4799400aeeae0b9ce24991ba03fae3496321311d 100644 --- a/core/modules/comment/comment.routing.yml +++ b/core/modules/comment/comment.routing.yml @@ -78,7 +78,7 @@ comment.node_redirect: _entity_access: 'node.view' _module_dependencies: 'node' -comment.type_list: +entity.comment_type.collection: path: '/admin/structure/comment' defaults: _entity_list: 'comment_type' diff --git a/core/modules/comment/src/CommentTypeForm.php b/core/modules/comment/src/CommentTypeForm.php index db9361aa18e553018056d842831538d981d2a224..3c7ef6af6f2f3689eb6e152dd20cd84a4a522f37 100644 --- a/core/modules/comment/src/CommentTypeForm.php +++ b/core/modules/comment/src/CommentTypeForm.php @@ -173,7 +173,7 @@ public function save(array $form, FormStateInterface $form_state) { $this->logger->notice('Comment type %label has been added.', array('%label' => $comment_type->label(), 'link' => $edit_link)); } - $form_state->setRedirect('comment.type_list'); + $form_state->setRedirectUrl($comment_type->urlInfo('collection')); } } diff --git a/core/modules/comment/src/Entity/CommentType.php b/core/modules/comment/src/Entity/CommentType.php index 80a1aaade61a0af70ffc054b100cc13b0d04d1a4..fb4144284b7e11d1a572f73de55ac28bfe5cd68c 100644 --- a/core/modules/comment/src/Entity/CommentType.php +++ b/core/modules/comment/src/Entity/CommentType.php @@ -36,7 +36,8 @@ * links = { * "delete-form" = "/admin/structure/comment/manage/{comment_type}/delete", * "edit-form" = "/admin/structure/comment/manage/{comment_type}", - * "add-form" = "/admin/structure/comment/types/add" + * "add-form" = "/admin/structure/comment/types/add", + * "collection" = "/admin/structure/comment/types", * } * ) */ diff --git a/core/modules/comment/src/Form/CommentTypeDeleteForm.php b/core/modules/comment/src/Form/CommentTypeDeleteForm.php index 7ac7ce72156e3d3f29ca5bdfce7a1e7aed9f956b..6fe26d4ccf1a51d63327dd3caaf4ad59deb1ed58 100644 --- a/core/modules/comment/src/Form/CommentTypeDeleteForm.php +++ b/core/modules/comment/src/Form/CommentTypeDeleteForm.php @@ -99,7 +99,7 @@ public function getQuestion() { * {@inheritdoc} */ public function getCancelUrl() { - return new Url('comment.type_list'); + return $this->entity->urlInfo('collection'); } /** @@ -143,7 +143,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { */ public function submitForm(array &$form, FormStateInterface $form_state) { $this->entity->delete(); - $form_state->setRedirect('comment.type_list'); + $form_state->setRedirectUrl($this->entity->urlInfo('collection')); drupal_set_message($this->t('Comment type %label has been deleted.', array('%label' => $this->entity->label()))); $this->logger->notice('comment type %label has been deleted.', array('%label' => $this->entity->label())); } diff --git a/core/modules/config/tests/config_test/config_test.links.action.yml b/core/modules/config/tests/config_test/config_test.links.action.yml index 8e1e4a4c5dfc77d7185e76bcd5ffe0e13812eb4b..f70a79080ab20c8fe6b21d8cc8f4e5cdc55ad230 100644 --- a/core/modules/config/tests/config_test/config_test.links.action.yml +++ b/core/modules/config/tests/config_test/config_test.links.action.yml @@ -2,4 +2,4 @@ config_test_entity_add_local_action: route_name: config_test.entity_add title: 'Add test configuration' appears_on: - - config_test.list_page + - entity.config_test.collection diff --git a/core/modules/config/tests/config_test/config_test.routing.yml b/core/modules/config/tests/config_test/config_test.routing.yml index 3a964818f700265d2081d48330a05d792fc45cc2..569b601cecac25ef2c49eb58d4d469882e58bfff 100644 --- a/core/modules/config/tests/config_test/config_test.routing.yml +++ b/core/modules/config/tests/config_test/config_test.routing.yml @@ -1,4 +1,4 @@ -config_test.list_page: +entity.config_test.collection: path: '/admin/structure/config_test' defaults: _entity_list: 'config_test' diff --git a/core/modules/config/tests/config_test/src/ConfigTestController.php b/core/modules/config/tests/config_test/src/ConfigTestController.php index cb626429a0f0441bb06b1952b812fa91f5439b9a..a195a6e06f317239e0d8395735e3d7745c8bc03a 100644 --- a/core/modules/config/tests/config_test/src/ConfigTestController.php +++ b/core/modules/config/tests/config_test/src/ConfigTestController.php @@ -41,7 +41,7 @@ public function editTitle(ConfigTest $config_test) { */ function enable(ConfigTest $config_test) { $config_test->enable()->save(); - return new RedirectResponse($this->url('config_test.list_page', array(), array('absolute' => TRUE))); + return new RedirectResponse($config_test->url('collection', array('absolute' => TRUE))); } /** @@ -55,7 +55,7 @@ function enable(ConfigTest $config_test) { */ function disable(ConfigTest $config_test) { $config_test->disable()->save(); - return new RedirectResponse(\Drupal::url('config_test.list_page', array(), array('absolute' => TRUE))); + return new RedirectResponse($config_test->url('collection', array('absolute' => TRUE))); } } diff --git a/core/modules/config/tests/config_test/src/ConfigTestForm.php b/core/modules/config/tests/config_test/src/ConfigTestForm.php index cb847ee4a49f77418b5586269a4d010928a693ae..e77ddb069fb70a03a29bd2ab10df6a40d8bddd60 100644 --- a/core/modules/config/tests/config_test/src/ConfigTestForm.php +++ b/core/modules/config/tests/config_test/src/ConfigTestForm.php @@ -81,7 +81,7 @@ public function save(array $form, FormStateInterface $form_state) { drupal_set_message(format_string('%label configuration has been created.', array('%label' => $entity->label()))); } - $form_state->setRedirect('config_test.list_page'); + $form_state->setRedirectUrl($this->entity->urlInfo('collection')); } } diff --git a/core/modules/config/tests/config_test/src/Entity/ConfigTest.php b/core/modules/config/tests/config_test/src/Entity/ConfigTest.php index d9b69df63e68f8532208e7a22c17d8f47a81dd95..e27fc16ef1f19c6c25744134ac1ece3120974ea8 100644 --- a/core/modules/config/tests/config_test/src/Entity/ConfigTest.php +++ b/core/modules/config/tests/config_test/src/Entity/ConfigTest.php @@ -37,7 +37,8 @@ * "edit-form" = "/admin/structure/config_test/manage/{config_test}", * "delete-form" = "/admin/structure/config_test/manage/{config_test}/delete", * "enable" = "/admin/structure/config_test/manage/{config_test}/enable", - * "disable" = "/admin/structure/config_test/manage/{config_test}/disable" + * "disable" = "/admin/structure/config_test/manage/{config_test}/disable", + * "collection" = "/admin/structure/config_test", * } * ) */ diff --git a/core/modules/config/tests/config_test/src/Form/ConfigTestDeleteForm.php b/core/modules/config/tests/config_test/src/Form/ConfigTestDeleteForm.php index 76fc67e243327403b0a85a5e03d2fe8ce5cde468..05d9dc2e9f551f9df46735971dd686949e43aeb6 100644 --- a/core/modules/config/tests/config_test/src/Form/ConfigTestDeleteForm.php +++ b/core/modules/config/tests/config_test/src/Form/ConfigTestDeleteForm.php @@ -34,7 +34,7 @@ public function getConfirmText() { * {@inheritdoc} */ public function getCancelUrl() { - return new Url('config_test.list_page'); + return $this->entity->urlInfo('collection'); } /** diff --git a/core/modules/config_translation/config_translation.module b/core/modules/config_translation/config_translation.module index 3655d49551c5b1bd1f029a49024b412d9dea8c01..ea4e532d093302a2fa6a1f0d328d1958d08691ae 100644 --- a/core/modules/config_translation/config_translation.module +++ b/core/modules/config_translation/config_translation.module @@ -23,7 +23,7 @@ function config_translation_help($route_name, RouteMatchInterface $route_match) $output .= '' . t('Add one or more forms on this page to set up your site-wide contact form.', array('@form' => \Drupal::url('contact.site_page'))) . '
'; - $output .= '' . t('A Contact menu item is added to the Footer menu, which you can modify on the Menus administration page.', array('@menu-settings' => \Drupal::url('menu_ui.overview_page'))) . '
'; + $output .= '' . t('A Contact menu item is added to the Footer menu, which you can modify on the Menus administration page.', array('@menu-settings' => \Drupal::url('entity.menu.collection'))) . '
'; $output .= '' . t('If you would like additional text to appear on the site-wide contact page, use a block. You can create and edit blocks on the Blocks administration page.', array('@blocks' => \Drupal::url('block.admin_display'))) . '
'; return $output; } diff --git a/core/modules/contact/contact.routing.yml b/core/modules/contact/contact.routing.yml index 876157d36defc4ff6ded8aadfcf7598b020fe877..2608a377fa1b27c365511430ea3daf647d338409 100644 --- a/core/modules/contact/contact.routing.yml +++ b/core/modules/contact/contact.routing.yml @@ -6,7 +6,7 @@ entity.contact_form.delete_form: requirements: _entity_access: 'contact_form.delete' -contact.form_list: +entity.contact_form.collection: path: '/admin/structure/contact' defaults: _entity_list: 'contact_form' diff --git a/core/modules/contact/src/ContactFormEditForm.php b/core/modules/contact/src/ContactFormEditForm.php index 420be7da1f8fff1bfdd8fabfb4ed3813dc7ad2f7..cc761529ea99ef46a2929bb72d2d25755a682ff1 100644 --- a/core/modules/contact/src/ContactFormEditForm.php +++ b/core/modules/contact/src/ContactFormEditForm.php @@ -130,7 +130,7 @@ public function save(array $form, FormStateInterface $form_state) { ->save(); } - $form_state->setRedirect('contact.form_list'); + $form_state->setRedirectUrl($contact_form->urlInfo('collection')); } } diff --git a/core/modules/contact/src/Entity/ContactForm.php b/core/modules/contact/src/Entity/ContactForm.php index c6ffdafe9c64b2a8e3aa93deb51b1523df114024..febc5366c5fb48cf1cee66e84eaa72c0b0b56de9 100644 --- a/core/modules/contact/src/Entity/ContactForm.php +++ b/core/modules/contact/src/Entity/ContactForm.php @@ -35,7 +35,8 @@ * }, * links = { * "delete-form" = "/admin/structure/contact/manage/{contact_form}/delete", - * "edit-form" = "/admin/structure/contact/manage/{contact_form}" + * "edit-form" = "/admin/structure/contact/manage/{contact_form}", + * "collection" = "/admin/structure/contact", * } * ) */ diff --git a/core/modules/contact/src/Form/ContactFormDeleteForm.php b/core/modules/contact/src/Form/ContactFormDeleteForm.php index a036f2eb2e89cd4b402c922a41b3f262a0a1a145..13333059c161947cb67e151a92713091d6ff1d84 100644 --- a/core/modules/contact/src/Form/ContactFormDeleteForm.php +++ b/core/modules/contact/src/Form/ContactFormDeleteForm.php @@ -27,7 +27,7 @@ public function getQuestion() { * {@inheritdoc} */ public function getCancelUrl() { - return new Url('contact.form_list'); + return $this->entity->urlInfo('collection'); } /** diff --git a/core/modules/content_translation/content_translation.install b/core/modules/content_translation/content_translation.install index 34d2717108b95be7ab5538c09fe29a2a9e8bc8e2..c6e173bd112e6a56084f47d5648c3cb601f82c8e 100644 --- a/core/modules/content_translation/content_translation.install +++ b/core/modules/content_translation/content_translation.install @@ -96,7 +96,7 @@ function content_translation_install() { function content_translation_enable() { // Translation works when at least two languages are added. if (count(\Drupal::languageManager()->getLanguages()) < 2) { - $t_args = array('!language_url' => \Drupal::url('language.admin_overview')); + $t_args = array('!language_url' => \Drupal::url('entity.configurable_language.collection')); $message = t('Be sure to add at least two languages to translate content.', $t_args); drupal_set_message($message, 'warning'); } diff --git a/core/modules/content_translation/content_translation.module b/core/modules/content_translation/content_translation.module index fd510b52028156c0d9c63e570d499575c68a5a3b..0c675584a2e93d02402ee2b4f02a7550defa210d 100644 --- a/core/modules/content_translation/content_translation.module +++ b/core/modules/content_translation/content_translation.module @@ -25,7 +25,7 @@ function content_translation_help($route_name, RouteMatchInterface $route_match) $output .= '' . t('This list shows all fields currently in use for easy reference.') . '
'; } } @@ -67,6 +67,7 @@ function field_ui_entity_type_build(array &$entity_types) { $entity_types['field_config']->setFormClass('delete', 'Drupal\field_ui\Form\FieldConfigDeleteForm'); $entity_types['field_config']->setListBuilderClass('Drupal\field_ui\FieldConfigListBuilder'); $entity_types['field_storage_config']->setListBuilderClass('Drupal\field_ui\FieldStorageConfigListBuilder'); + $entity_types['field_storage_config']->setLinkTemplate('collection', '/admin/reports/fields'); foreach ($entity_types as $entity_type) { if ($bundle = $entity_type->getBundleOf()) { @@ -285,6 +286,7 @@ function field_ui_entity_type_alter(array &$entity_types) { $form_mode->set('admin_permission', 'administer display modes'); $form_mode->setLinkTemplate('delete-form', '/admin/structure/display-modes/form/manage/{entity_form_mode}/delete'); $form_mode->setLinkTemplate('edit-form', '/admin/structure/display-modes/form/manage/{entity_form_mode}'); + $form_mode->setLinkTemplate('collection', '/admin/structure/display-modes/form'); $view_mode = $entity_types['entity_view_mode']; $view_mode->setListBuilderClass('Drupal\field_ui\EntityDisplayModeListBuilder'); @@ -294,4 +296,5 @@ function field_ui_entity_type_alter(array &$entity_types) { $view_mode->set('admin_permission', 'administer display modes'); $view_mode->setLinkTemplate('delete-form', '/admin/structure/display-modes/view/manage/{entity_view_mode}/delete'); $view_mode->setLinkTemplate('edit-form', '/admin/structure/display-modes/view/manage/{entity_view_mode}'); + $view_mode->setLinkTemplate('collection', '/admin/structure/display-modes/view'); } diff --git a/core/modules/field_ui/field_ui.routing.yml b/core/modules/field_ui/field_ui.routing.yml index b7ab5b580143e4adae4494c3bfd950c9a4aa68ef..22b8c7bf7f9ffedf03cf8139646a0b8bc1d7cb13 100644 --- a/core/modules/field_ui/field_ui.routing.yml +++ b/core/modules/field_ui/field_ui.routing.yml @@ -1,4 +1,4 @@ -field_ui.list: +entity.field_storage_config.collection: path: '/admin/reports/fields' defaults: _entity_list: 'field_storage_config' @@ -14,7 +14,7 @@ field_ui.display_mode: requirements: _permission: 'administer display modes' -field_ui.entity_view_mode_list: +entity.entity_view_mode.collection: path: '/admin/structure/display-modes/view' defaults: _entity_list: 'entity_view_mode' @@ -54,7 +54,7 @@ entity.entity_view_mode.delete_form: requirements: _entity_access: 'entity_view_mode.delete' -field_ui.entity_form_mode_list: +entity.entity_form_mode.collection: path: '/admin/structure/display-modes/form' defaults: _entity_list: 'entity_form_mode' diff --git a/core/modules/field_ui/src/Form/EntityDisplayModeDeleteForm.php b/core/modules/field_ui/src/Form/EntityDisplayModeDeleteForm.php index 315c918aae1c8cf217e3c278327ef4bfc06ae91b..f50dbe6ba0fe2a3231cbb749c620d469b3e64425 100644 --- a/core/modules/field_ui/src/Form/EntityDisplayModeDeleteForm.php +++ b/core/modules/field_ui/src/Form/EntityDisplayModeDeleteForm.php @@ -9,7 +9,6 @@ use Drupal\Core\Entity\EntityConfirmFormBase; use Drupal\Core\Form\FormStateInterface; -use Drupal\Core\Url; /** * Provides the delete form for entity display modes. @@ -20,7 +19,7 @@ class EntityDisplayModeDeleteForm extends EntityConfirmFormBase { * {@inheritdoc} */ public function getCancelUrl() { - return new Url('field_ui.' . $this->entity->getEntityTypeId() . '_list'); + return $this->entity->urlInfo('collection'); } /** diff --git a/core/modules/field_ui/src/Form/EntityDisplayModeFormBase.php b/core/modules/field_ui/src/Form/EntityDisplayModeFormBase.php index 9b7fdd2fc05bf075b73fa00463f640c6d2c0f5d9..0bdce49df5a46429e4f1881094c399be4a256f34 100644 --- a/core/modules/field_ui/src/Form/EntityDisplayModeFormBase.php +++ b/core/modules/field_ui/src/Form/EntityDisplayModeFormBase.php @@ -125,7 +125,7 @@ public function save(array $form, FormStateInterface $form_state) { drupal_set_message(t('Saved the %label @entity-type.', array('%label' => $this->entity->label(), '@entity-type' => $this->entityType->getLowercaseLabel()))); $this->entity->save(); \Drupal::entityManager()->clearCachedFieldDefinitions(); - $form_state->setRedirect('field_ui.' . $this->entity->getEntityTypeId() . '_list'); + $form_state->setRedirectUrl($this->entity->urlInfo('collection')); } } diff --git a/core/modules/image/image.info.yml b/core/modules/image/image.info.yml index 4a704cca36c948604de25cf90ffc952e86a2cd69..6ce28ec06f7a9b01308aa19eb882956339528b0b 100644 --- a/core/modules/image/image.info.yml +++ b/core/modules/image/image.info.yml @@ -6,4 +6,4 @@ version: VERSION core: 8.x dependencies: - file -configure: image.style_list +configure: entity.image_style.collection diff --git a/core/modules/image/image.links.action.yml b/core/modules/image/image.links.action.yml index 134f3a83e5ac8604ea0d71f3cafa96ff0c6ae893..2b3ce09987a3632f8518ee02b1df8786efb64afe 100644 --- a/core/modules/image/image.links.action.yml +++ b/core/modules/image/image.links.action.yml @@ -2,4 +2,4 @@ image_style_add_action: route_name: image.style_add title: 'Add image style' appears_on: - - image.style_list + - entity.image_style.collection diff --git a/core/modules/image/image.links.menu.yml b/core/modules/image/image.links.menu.yml index 02b60e800d7d3cfa276e4b17a80da05199c06ae5..235d01cc7f54e0929c33e5488d710d061d13cea2 100644 --- a/core/modules/image/image.links.menu.yml +++ b/core/modules/image/image.links.menu.yml @@ -1,5 +1,5 @@ -image.style_list: +entity.image_style.collection: title: 'Image styles' description: 'Configure styles that can be used for resizing or adjusting images on display.' parent: system.admin_config_media - route_name: image.style_list + route_name: entity.image_style.collection diff --git a/core/modules/image/image.links.task.yml b/core/modules/image/image.links.task.yml index cf835eb4e00af7113a5fd7475d9a0ccbe98643b4..3e7a9af613aa24aaf856386a73275750aaf56324 100644 --- a/core/modules/image/image.links.task.yml +++ b/core/modules/image/image.links.task.yml @@ -3,7 +3,7 @@ entity.image_style.edit_form: route_name: entity.image_style.edit_form base_route: entity.image_style.edit_form -image.style_list: +entity.image_style.collection: title: List - route_name: image.style_list - base_route: image.style_list + route_name: entity.image_style.collection + base_route: entity.image_style.collection diff --git a/core/modules/image/image.module b/core/modules/image/image.module index dfa54c6ae2f4b7219fed35d3151bb21daad17edb..76710300b284421e2e63fa5a04aabbb66f06a1c3 100644 --- a/core/modules/image/image.module +++ b/core/modules/image/image.module @@ -56,18 +56,18 @@ function image_help($route_name, RouteMatchInterface $route_match) { $output .= '' . t('Image styles commonly provide thumbnail sizes by scaling and cropping images, but can also add various effects before an image is displayed. When an image is displayed with a style, a new file is created and the original image is left unchanged.') . '
'; case 'image.effect_add_form': diff --git a/core/modules/image/image.routing.yml b/core/modules/image/image.routing.yml index 24b72d37b1f56ed8e2ab2f864f5f16b279b526c0..ffeed861a2a95416e2d9a1871ed36f5ec337482b 100644 --- a/core/modules/image/image.routing.yml +++ b/core/modules/image/image.routing.yml @@ -38,7 +38,7 @@ image.effect_delete: requirements: _permission: 'administer image styles' -image.style_list: +entity.image_style.collection: path: '/admin/config/media/image-styles' defaults: _entity_list: 'image_style' diff --git a/core/modules/image/src/Entity/ImageStyle.php b/core/modules/image/src/Entity/ImageStyle.php index a87554c99f60e8514938589c5ce4fc50d6c1c262..cf9c861a023562b9a002516da7e64a703458ea2f 100644 --- a/core/modules/image/src/Entity/ImageStyle.php +++ b/core/modules/image/src/Entity/ImageStyle.php @@ -46,7 +46,8 @@ * links = { * "flush-form" = "/admin/config/media/image-styles/manage/{image_style}/flush", * "edit-form" = "/admin/config/media/image-styles/manage/{image_style}", - * "delete-form" = "/admin/config/media/image-styles/manage/{image_style}/delete" + * "delete-form" = "/admin/config/media/image-styles/manage/{image_style}/delete", + * "collection" = "/admin/config/media/image-styles", * } * ) */ diff --git a/core/modules/image/src/Form/ImageStyleDeleteForm.php b/core/modules/image/src/Form/ImageStyleDeleteForm.php index 65dddacf200e29821efa13b295aaf8653522e78b..05939fbd54dc42d4c31d50090c972b1da65fb921 100644 --- a/core/modules/image/src/Form/ImageStyleDeleteForm.php +++ b/core/modules/image/src/Form/ImageStyleDeleteForm.php @@ -9,7 +9,6 @@ use Drupal\Core\Entity\EntityConfirmFormBase; use Drupal\Core\Form\FormStateInterface; -use Drupal\Core\Url; /** * Creates a form to delete an image style. @@ -34,7 +33,7 @@ public function getConfirmText() { * {@inheritdoc} */ public function getCancelUrl() { - return new Url('image.style_list'); + return $this->entity->urlInfo('collection'); } /** diff --git a/core/modules/image/src/Form/ImageStyleFlushForm.php b/core/modules/image/src/Form/ImageStyleFlushForm.php index d5f0ea55f74082d54660471cbb0a7a45a4f52782..9cc5586f8751515e6e496e391632fa76b15787cc 100644 --- a/core/modules/image/src/Form/ImageStyleFlushForm.php +++ b/core/modules/image/src/Form/ImageStyleFlushForm.php @@ -9,7 +9,6 @@ use Drupal\Core\Entity\EntityConfirmFormBase; use Drupal\Core\Form\FormStateInterface; -use Drupal\Core\Url; /** * Form controller for image style flush. @@ -41,7 +40,7 @@ public function getConfirmText() { * {@inheritdoc} */ public function getCancelUrl() { - return new Url('image.style_list'); + return $this->entity->urlInfo('collection'); } /** diff --git a/core/modules/image/src/Plugin/Field/FieldFormatter/ImageFormatter.php b/core/modules/image/src/Plugin/Field/FieldFormatter/ImageFormatter.php index 3b47a3bf694319bbc8a19a81a5200ee377e169e2..dd34fc4811d112852d0e182a14c7cfa8729cef4b 100644 --- a/core/modules/image/src/Plugin/Field/FieldFormatter/ImageFormatter.php +++ b/core/modules/image/src/Plugin/Field/FieldFormatter/ImageFormatter.php @@ -44,13 +44,6 @@ class ImageFormatter extends ImageFormatterBase implements ContainerFactoryPlugi */ protected $linkGenerator; - /** - * The url generator service. - * - * @var \Drupal\Core\Routing\UrlGeneratorInterface - */ - protected $urlGenerator; - /** * Constructs an ImageFormatter object. * @@ -72,14 +65,11 @@ class ImageFormatter extends ImageFormatterBase implements ContainerFactoryPlugi * The current user. * @param \Drupal\Core\Utility\LinkGeneratorInterface $link_generator * The link generator service. - * @param \Drupal\Core\Routing\UrlGeneratorInterface $url_generator - * The url generator service. */ - public function __construct($plugin_id, $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, $label, $view_mode, array $third_party_settings, AccountInterface $current_user, LinkGeneratorInterface $link_generator, UrlGeneratorInterface $url_generator) { + public function __construct($plugin_id, $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, $label, $view_mode, array $third_party_settings, AccountInterface $current_user, LinkGeneratorInterface $link_generator) { parent::__construct($plugin_id, $plugin_definition, $field_definition, $settings, $label, $view_mode, $third_party_settings); $this->currentUser = $current_user; $this->linkGenerator = $link_generator; - $this->urlGenerator = $url_generator; } /** @@ -95,8 +85,7 @@ public static function create(ContainerInterface $container, array $configuratio $configuration['view_mode'], $configuration['third_party_settings'], $container->get('current_user'), - $container->get('link_generator'), - $container->get('url_generator') + $container->get('link_generator') ); } @@ -122,7 +111,7 @@ public function settingsForm(array $form, FormStateInterface $form_state) { '#empty_option' => t('None (original image)'), '#options' => $image_styles, '#description' => array( - '#markup' => $this->linkGenerator->generate($this->t('Configure Image Styles', array('@url' => $this->urlGenerator->generateFromRoute('image.style_list'))), new Url('image.style_list')), + '#markup' => $this->linkGenerator->generate($this->t('Configure Image Styles'), new Url('entity.image_style.collection')), '#access' => $this->currentUser->hasPermission('administer image styles'), ), ); diff --git a/core/modules/image/src/Tests/ImageFieldDisplayTest.php b/core/modules/image/src/Tests/ImageFieldDisplayTest.php index f0b04cbfdef87dae7b7f2c86425a4307eaec70ad..4fef5f59cc7bdfd080acd5f7342b88f1ae74100d 100644 --- a/core/modules/image/src/Tests/ImageFieldDisplayTest.php +++ b/core/modules/image/src/Tests/ImageFieldDisplayTest.php @@ -55,7 +55,7 @@ function _testImageFieldFormatters($scheme) { // Test for existence of link to image styles configuration. $this->drupalPostAjaxForm(NULL, array(), "{$field_name}_settings_edit"); - $this->assertLinkByHref(\Drupal::url('image.style_list'), 0, 'Link to image styles configuration is found'); + $this->assertLinkByHref(\Drupal::url('entity.image_style.collection'), 0, 'Link to image styles configuration is found'); // Remove 'administer image styles' permission from testing admin user. $admin_user_roles = $this->adminUser->getRoles(TRUE); @@ -66,7 +66,7 @@ function _testImageFieldFormatters($scheme) { // Test for absence of link to image styles configuration. $this->drupalPostAjaxForm(NULL, array(), "{$field_name}_settings_edit"); - $this->assertNoLinkByHref(\Drupal::url('image.style_list'), 'Link to image styles configuration is absent when permissions are insufficient'); + $this->assertNoLinkByHref(\Drupal::url('entity.image_style.collection'), 'Link to image styles configuration is absent when permissions are insufficient'); // Restore 'administer image styles' permission to testing admin user user_role_change_permissions(reset($admin_user_roles), array('administer image styles' => TRUE)); diff --git a/core/modules/language/language.info.yml b/core/modules/language/language.info.yml index c1cf7ffbd76fe68c2af048a7099fb48d6ae66392..30770401ad6a892455a48c6aa35dafd3076bdbe9 100644 --- a/core/modules/language/language.info.yml +++ b/core/modules/language/language.info.yml @@ -4,4 +4,4 @@ description: 'Allows users to configure languages and apply them to content.' package: Multilingual version: VERSION core: 8.x -configure: language.admin_overview +configure: entity.configurable_language.collection diff --git a/core/modules/language/language.links.action.yml b/core/modules/language/language.links.action.yml index ad09aa11d6ab0dfe9696530cb1fc0c51723d1abe..18fd382e3d0c9ff28fc12710525506b4e3313894 100644 --- a/core/modules/language/language.links.action.yml +++ b/core/modules/language/language.links.action.yml @@ -2,4 +2,4 @@ language_add_local_action: route_name: language.add title: 'Add language' appears_on: - - language.admin_overview + - entity.configurable_language.collection diff --git a/core/modules/language/language.links.menu.yml b/core/modules/language/language.links.menu.yml index 26f9f9a7a9e998a2c20f0d8adce1137e0b796d92..3b012283863c4e3024f9e597ba2ae7c5f3c45bee 100644 --- a/core/modules/language/language.links.menu.yml +++ b/core/modules/language/language.links.menu.yml @@ -1,7 +1,7 @@ -language.admin_overview: +entity.configurable_language.collection: title: Languages description: 'Configure languages for content and the user interface.' - route_name: language.admin_overview + route_name: entity.configurable_language.collection parent: system.admin_config_regional language.content_settings_page: title: 'Content language' diff --git a/core/modules/language/language.links.task.yml b/core/modules/language/language.links.task.yml index 76f5406e54d8587ab1f2d68e9573ffd5ff011522..e9b6ca56e68403a36f40c53b0a963dd9e5f5800f 100644 --- a/core/modules/language/language.links.task.yml +++ b/core/modules/language/language.links.task.yml @@ -1,11 +1,11 @@ -language.admin_overview: +entity.configurable_language.collection: title: 'List' - route_name: language.admin_overview - base_route: language.admin_overview + route_name: entity.configurable_language.collection + base_route: entity.configurable_language.collection language.negotiation: title: 'Detection and selection' route_name: language.negotiation - base_route: language.admin_overview + base_route: entity.configurable_language.collection entity.configurable_language.edit_form: title: 'Edit' diff --git a/core/modules/language/language.module b/core/modules/language/language.module index 89ab28b5212ac685ffdb8ef2339c20557b6ed243..01f3d0b35c9433a33d8ec58541034a2d0d544c18 100644 --- a/core/modules/language/language.module +++ b/core/modules/language/language.module @@ -32,7 +32,7 @@ function language_help($route_name, RouteMatchInterface $route_match) { $output .= '' . t('Reorder the added languages to set their order in the language switcher block and, when editing content, in the list of selectable languages. This ordering does not impact detection and selection.', array('@detection' => \Drupal::url('language.negotiation'))) . '
'; case 'language.add': @@ -69,11 +69,11 @@ function language_help($route_name, RouteMatchInterface $route_match) { return $output; case 'language.negotiation_browser': - $output = '' . t('Browsers use different language codes to refer to the same languages. Internally, a best effort is made to determine the correct language based on the code that the browser sends. You can add and edit additional mappings from browser language codes to site languages.', array('!configure-languages' => \Drupal::url('language.admin_overview'))) . '
'; + $output = '' . t('Browsers use different language codes to refer to the same languages. Internally, a best effort is made to determine the correct language based on the code that the browser sends. You can add and edit additional mappings from browser language codes to site languages.', array('!configure-languages' => \Drupal::url('entity.configurable_language.collection'))) . '
'; return $output; case 'language.negotiation_selected': - $output = '' . t('Changing the selected language here (and leaving this option as the last among the detection and selection options) is the easiest way to change the fallback language for the website, if you need to change how your site works by default (e.g., when using an empty path prefix or using the default domain). Changing the site\'s default language itself might have other undesired side effects.', array('!admin-change-language' => \Drupal::url('language.admin_overview'))) . '
'; + $output = '' . t('Changing the selected language here (and leaving this option as the last among the detection and selection options) is the easiest way to change the fallback language for the website, if you need to change how your site works by default (e.g., when using an empty path prefix or using the default domain). Changing the site\'s default language itself might have other undesired side effects.', array('!admin-change-language' => \Drupal::url('entity.configurable_language.collection'))) . '
'; return $output; case 'entity.block.edit_form': diff --git a/core/modules/language/language.routing.yml b/core/modules/language/language.routing.yml index 4d78d6d40d6574e2139f7d7964d65a384a1e3e79..d21941d40a821eef4ac13d1d4aa3e3c649273a1c 100644 --- a/core/modules/language/language.routing.yml +++ b/core/modules/language/language.routing.yml @@ -38,7 +38,7 @@ entity.configurable_language.edit_form: requirements: _entity_access: 'configurable_language.update' -language.admin_overview: +entity.configurable_language.collection: path: '/admin/config/regional/language' defaults: _entity_list: 'configurable_language' diff --git a/core/modules/language/src/Element/LanguageConfiguration.php b/core/modules/language/src/Element/LanguageConfiguration.php index ad998f71ada97268458bc0aa24bc6e9ad88a2173..02c17887f157a4829cb5335639438588acb638b2 100644 --- a/core/modules/language/src/Element/LanguageConfiguration.php +++ b/core/modules/language/src/Element/LanguageConfiguration.php @@ -47,7 +47,7 @@ public static function processLanguageConfiguration(&$element, FormStateInterfac '#type' => 'select', '#title' => t('Default language'), '#options' => $options + static::getDefaultOptions(), - '#description' => t('Explanation of the language options is found on the languages list page.', array('@languages_list_page' => \Drupal::url('language.admin_overview'))), + '#description' => t('Explanation of the language options is found on the languages list page.', array('@languages_list_page' => \Drupal::url('entity.configurable_language.collection'))), '#default_value' => ($default_config != NULL) ? $default_config->getDefaultLangcode() : LanguageInterface::LANGCODE_SITE_DEFAULT, ); diff --git a/core/modules/language/src/Entity/ConfigurableLanguage.php b/core/modules/language/src/Entity/ConfigurableLanguage.php index e52f763946c405cc68c22fe78fbe67cf0af34ee1..a754654b9a4aef4223e28f56f3c1d93cf40f2983 100644 --- a/core/modules/language/src/Entity/ConfigurableLanguage.php +++ b/core/modules/language/src/Entity/ConfigurableLanguage.php @@ -39,7 +39,8 @@ * }, * links = { * "delete-form" = "/admin/config/regional/language/delete/{configurable_language}", - * "edit-form" = "/admin/config/regional/language/edit/{configurable_language}" + * "edit-form" = "/admin/config/regional/language/edit/{configurable_language}", + * "collection" = "/admin/config/regional/language", * } * ) */ diff --git a/core/modules/language/src/Form/LanguageAddForm.php b/core/modules/language/src/Form/LanguageAddForm.php index f78bb839e9b85e246c9f6b6854dbbad01d568055..fc27626aeb8c48de8714e988e75f4850bdce1e27 100644 --- a/core/modules/language/src/Form/LanguageAddForm.php +++ b/core/modules/language/src/Form/LanguageAddForm.php @@ -97,7 +97,7 @@ public function save(array $form, FormStateInterface $form_state) { // to their theme so they can switch between the languages. drupal_set_message($this->t('Use one of the language switcher blocks to allow site visitors to switch between languages. You can enable these blocks on the block administration page.', array('@block-admin' => $this->url('block.admin_display')))); } - $form_state->setRedirect('language.admin_overview'); + $form_state->setRedirectUrl($this->entity->urlInfo('collection')); } /** diff --git a/core/modules/language/src/Form/LanguageDeleteForm.php b/core/modules/language/src/Form/LanguageDeleteForm.php index 384237214e3deccc7a00c981bc35ad044cd38ead..f26948abdb97786c8391bf0658c987226b6acef0 100644 --- a/core/modules/language/src/Form/LanguageDeleteForm.php +++ b/core/modules/language/src/Form/LanguageDeleteForm.php @@ -10,11 +10,9 @@ use Drupal\Core\Entity\EntityConfirmFormBase; use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Routing\UrlGeneratorInterface; -use Drupal\Core\Url; use Drupal\Core\Language\LanguageManagerInterface; use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\HttpFoundation\RedirectResponse; -use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; /** @@ -70,7 +68,7 @@ public function getQuestion() { * {@inheritdoc} */ public function getCancelUrl() { - return new Url('language.admin_overview'); + return $this->entity->urlInfo('collection'); } /** diff --git a/core/modules/language/src/Form/LanguageEditForm.php b/core/modules/language/src/Form/LanguageEditForm.php index 58b9951966e4c3c5eef79d3f4025f944a0a1221b..79a3a171efd3ae2bee38a9ce478888a17411e9c9 100644 --- a/core/modules/language/src/Form/LanguageEditForm.php +++ b/core/modules/language/src/Form/LanguageEditForm.php @@ -49,7 +49,7 @@ public function actions(array $form, FormStateInterface $form_state) { */ public function save(array $form, FormStateInterface $form_state) { parent::save($form, $form_state); - $form_state->setRedirect('language.admin_overview'); + $form_state->setRedirectUrl($this->entity->urlInfo('collection')); $this->logger('language')->notice('The %language (%langcode) language has been updated.', array('%language' => $this->entity->label(), '%langcode' => $this->entity->id())); } diff --git a/core/modules/language/src/Tests/LanguageConfigurationTest.php b/core/modules/language/src/Tests/LanguageConfigurationTest.php index 27abc6b9cec883e59f681c7ef414389234d8f3c4..9a43437c84b6de532c9718bc8a729d3eb2cbf0f4 100644 --- a/core/modules/language/src/Tests/LanguageConfigurationTest.php +++ b/core/modules/language/src/Tests/LanguageConfigurationTest.php @@ -43,7 +43,7 @@ function testLanguageConfiguration() { ); $this->drupalPostForm('admin/config/regional/language/add', $edit, 'Add language'); $this->assertText('French'); - $this->assertUrl(\Drupal::url('language.admin_overview', [], ['absolute' => TRUE]), [], 'Correct page redirection.'); + $this->assertUrl(\Drupal::url('entity.configurable_language.collection', [], ['absolute' => TRUE]), [], 'Correct page redirection.'); // Langcode for Languages is always 'en'. $language = $this->config('language.entity.fr')->get(); $this->assertEqual($language['langcode'], 'en'); diff --git a/core/modules/language/src/Tests/LanguageCustomLanguageConfigurationTest.php b/core/modules/language/src/Tests/LanguageCustomLanguageConfigurationTest.php index a4878d3e802d4cad01b6c1d3529bfc1983090a8b..fb7487825e32fc3c29d1a2c0f87d119e1cf18f51 100644 --- a/core/modules/language/src/Tests/LanguageCustomLanguageConfigurationTest.php +++ b/core/modules/language/src/Tests/LanguageCustomLanguageConfigurationTest.php @@ -76,7 +76,7 @@ public function testLanguageConfiguration() { 'The language %language has been created and can now be used.', array('%language' => $edit['label']) )); - $this->assertUrl(\Drupal::url('language.admin_overview', array(), array('absolute' => TRUE)), [], 'Correct page redirection.'); + $this->assertUrl(\Drupal::url('entity.configurable_language.collection', array(), array('absolute' => TRUE)), [], 'Correct page redirection.'); // Test validation of existing language values. $edit = array( @@ -92,7 +92,7 @@ public function testLanguageConfiguration() { 'The language %language has been created and can now be used.', array('%language' => $edit['label']) )); - $this->assertUrl(\Drupal::url('language.admin_overview', array(), array('absolute' => TRUE)), [], 'Correct page redirection.'); + $this->assertUrl(\Drupal::url('entity.configurable_language.collection', array(), array('absolute' => TRUE)), [], 'Correct page redirection.'); // Add the language a second time and confirm that this is not allowed. $this->drupalPostForm('admin/config/regional/language/add', $edit, t('Add custom language')); diff --git a/core/modules/language/src/Tests/LanguageListTest.php b/core/modules/language/src/Tests/LanguageListTest.php index c27f98126eeffc0db44d90e1c47bb03bb416bc7d..52f6e4cf0e7987d02cab7a1842cbc34dc53fbaaf 100644 --- a/core/modules/language/src/Tests/LanguageListTest.php +++ b/core/modules/language/src/Tests/LanguageListTest.php @@ -41,7 +41,7 @@ function testLanguageList() { ); $this->drupalPostForm('admin/config/regional/language/add', $edit, t('Add language')); $this->assertText('French', 'Language added successfully.'); - $this->assertUrl(\Drupal::url('language.admin_overview', [], ['absolute' => TRUE])); + $this->assertUrl(\Drupal::url('entity.configurable_language.collection', [], ['absolute' => TRUE])); // Add custom language. $langcode = 'xx'; @@ -53,7 +53,7 @@ function testLanguageList() { 'direction' => Language::DIRECTION_LTR, ); $this->drupalPostForm('admin/config/regional/language/add', $edit, t('Add custom language')); - $this->assertUrl(\Drupal::url('language.admin_overview', [], ['absolute' => TRUE])); + $this->assertUrl(\Drupal::url('entity.configurable_language.collection', [], ['absolute' => TRUE])); $this->assertRaw('"edit-languages-' . $langcode .'-weight"', 'Language code found.'); $this->assertText(t($name), 'Test language added.'); @@ -75,7 +75,7 @@ function testLanguageList() { // Ensure we can't delete the default language. $this->drupalGet('admin/config/regional/language/delete/' . $langcode); - $this->assertUrl(\Drupal::url('language.admin_overview', [], ['absolute' => TRUE, 'language' => $language])); + $this->assertUrl(\Drupal::url('entity.configurable_language.collection', [], ['absolute' => TRUE, 'language' => $language])); $this->assertText(t('The default language cannot be deleted.'), 'Failed to delete the default language.'); // Ensure 'Edit' link works. @@ -88,7 +88,7 @@ function testLanguageList() { ); $this->drupalPostForm('admin/config/regional/language/edit/' . $langcode, $edit, t('Save language')); $this->assertRaw($name, 'The language has been updated.'); - $this->assertUrl(\Drupal::url('language.admin_overview', [], ['absolute' => TRUE, 'language' => $language])); + $this->assertUrl(\Drupal::url('entity.configurable_language.collection', [], ['absolute' => TRUE, 'language' => $language])); // Change back the default language. $edit = array( @@ -104,7 +104,7 @@ function testLanguageList() { $this->drupalGet('admin/config/regional/language/delete/' . $langcode); // First test the 'cancel' link. $this->clickLink(t('Cancel')); - $this->assertUrl(\Drupal::url('language.admin_overview', [], ['absolute' => TRUE, 'language' => $english])); + $this->assertUrl(\Drupal::url('entity.configurable_language.collection', [], ['absolute' => TRUE, 'language' => $english])); $this->assertRaw($name, 'The language was not deleted.'); // Delete the language for real. This a confirm form, we do not need any // fields changed. @@ -112,7 +112,7 @@ function testLanguageList() { // We need raw here because %language and %langcode will add HTML. $t_args = array('%language' => $name, '%langcode' => $langcode); $this->assertRaw(t('The %language (%langcode) language has been removed.', $t_args), 'The test language has been removed.'); - $this->assertUrl(\Drupal::url('language.admin_overview', [], ['absolute' => TRUE, 'language' => $english])); + $this->assertUrl(\Drupal::url('entity.configurable_language.collection', [], ['absolute' => TRUE, 'language' => $english])); // Verify that language is no longer found. $this->drupalGet('admin/config/regional/language/delete/' . $langcode); $this->assertResponse(404, 'Language no longer found.'); @@ -124,7 +124,7 @@ function testLanguageList() { // We need raw here because %language and %langcode will add HTML. $t_args = array('%language' => 'French', '%langcode' => 'fr'); $this->assertRaw(t('The %language (%langcode) language has been removed.', $t_args), 'The French language has been removed.'); - $this->assertUrl(\Drupal::url('language.admin_overview', [], ['absolute' => TRUE])); + $this->assertUrl(\Drupal::url('entity.configurable_language.collection', [], ['absolute' => TRUE])); // Verify that language is no longer found. $this->drupalGet('admin/config/regional/language/delete/fr'); $this->assertResponse(404, 'Language no longer found.'); @@ -142,7 +142,7 @@ function testLanguageList() { 'direction' => Language::DIRECTION_LTR, ); $this->drupalPostForm('admin/config/regional/language/add', $edit, t('Add custom language')); - $this->assertUrl(\Drupal::url('language.admin_overview', [], ['absolute' => TRUE])); + $this->assertUrl(\Drupal::url('entity.configurable_language.collection', [], ['absolute' => TRUE])); $this->assertText($name, 'Name found.'); // Check if we can change the default language. diff --git a/core/modules/language/tests/src/Unit/Menu/LanguageLocalTasksTest.php b/core/modules/language/tests/src/Unit/Menu/LanguageLocalTasksTest.php index dd1eff607953520678943e638678c47ba29fc517..6e35abbb4786c51327d77d74873856fa7f255fd4 100644 --- a/core/modules/language/tests/src/Unit/Menu/LanguageLocalTasksTest.php +++ b/core/modules/language/tests/src/Unit/Menu/LanguageLocalTasksTest.php @@ -37,8 +37,8 @@ public function testLanguageAdminLocalTasks($route, $expected) { */ public function getLanguageAdminOverviewRoutes() { return array( - array('language.admin_overview', array(array('language.admin_overview', 'language.negotiation'))), - array('language.negotiation', array(array('language.admin_overview', 'language.negotiation'))), + array('entity.configurable_language.collection', array(array('entity.configurable_language.collection', 'language.negotiation'))), + array('language.negotiation', array(array('entity.configurable_language.collection', 'language.negotiation'))), ); } diff --git a/core/modules/locale/locale.module b/core/modules/locale/locale.module index 52a5eb9e2dca1de61117ec43aaf2ebee987289ea..c7cc9db33e956a4d84049bf98ce3d8c62ba013b5 100644 --- a/core/modules/locale/locale.module +++ b/core/modules/locale/locale.module @@ -149,15 +149,15 @@ function locale_help($route_name, RouteMatchInterface $route_match) { $output .= '' . t('Interface translations are automatically imported when a language is added, or when new modules or themes are enabled. The report Available translation updates shows the status. Interface text can be customized in the user interface translation page.', array('!update' => \Drupal::url('locale.translate_status'), '!translate' => \Drupal::url('locale.translate_page'))) . '
'; case 'locale.translate_page': @@ -165,7 +165,7 @@ function locale_help($route_name, RouteMatchInterface $route_match) { return $output; case 'locale.translate_import': - $output = '' . t('Translation files are automatically downloaded and imported when languages are added, or when modules or themes are enabled.', array('!language' => \Drupal::url('language.admin_overview'))) . '
'; + $output = '' . t('Translation files are automatically downloaded and imported when languages are added, or when modules or themes are enabled.', array('!language' => \Drupal::url('entity.configurable_language.collection'))) . '
'; $output .= '' . t('This page allows translators to manually import translated strings contained in a Gettext Portable Object (.po) file. Manual import may be used for customized translations or for the translation of custom modules and themes. To customize translations you can download a translation file from the Drupal translation server or export translations from the site, customize the translations using a Gettext translation editor, and import the result using this page.', array('!url' => 'https://localize.drupal.org', '!export' => \Drupal::url('locale.translate_export'))) . '
'; $output .= '' . t('Note that importing large .po files may take several minutes.') . '
'; return $output; diff --git a/core/modules/locale/src/Form/TranslationStatusForm.php b/core/modules/locale/src/Form/TranslationStatusForm.php index b779ca70bb3f0f8b6421d30a5092f6391e59851b..ee0702990a3d5a8f7446d48f36365cc169d1afa7 100644 --- a/core/modules/locale/src/Form/TranslationStatusForm.php +++ b/core/modules/locale/src/Form/TranslationStatusForm.php @@ -135,7 +135,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { if (!$languages) { $empty = $this->t('No translatable languages available. Add a language first.', array( - '@add_language' => $this->url('language.admin_overview'), + '@add_language' => $this->url('entity.configurable_language.collection'), )); } elseif ($status) { diff --git a/core/modules/locale/src/Tests/LocaleUpdateInterfaceTest.php b/core/modules/locale/src/Tests/LocaleUpdateInterfaceTest.php index 248e35c90f5258a6f7f948efe9c8a7c814455243..d26a0705cc94d5372fef2c0c16fd88499f5a3b9b 100644 --- a/core/modules/locale/src/Tests/LocaleUpdateInterfaceTest.php +++ b/core/modules/locale/src/Tests/LocaleUpdateInterfaceTest.php @@ -45,7 +45,7 @@ public function testInterface() { $this->assertNoText(t('Translation update status'), 'No status message'); $this->drupalGet('admin/reports/translations'); - $this->assertRaw(t('No translatable languages available. Add a language first.', array('@add_language' => \Drupal::url('language.admin_overview'))), 'Language message'); + $this->assertRaw(t('No translatable languages available. Add a language first.', array('@add_language' => \Drupal::url('entity.configurable_language.collection'))), 'Language message'); // Add German language. $this->addLanguage('de'); diff --git a/core/modules/menu_link_content/src/Tests/MenuLinkContentUITest.php b/core/modules/menu_link_content/src/Tests/MenuLinkContentUITest.php index a876fb3ffb492b6786c6f8ecc50d272ac65b2a3f..65404e85142efe54a266856447a1f0e5ec1804a6 100644 --- a/core/modules/menu_link_content/src/Tests/MenuLinkContentUITest.php +++ b/core/modules/menu_link_content/src/Tests/MenuLinkContentUITest.php @@ -56,7 +56,7 @@ protected function getAdministratorPermissions() { */ protected function createEntity($values, $langcode, $bundle_name = NULL) { $values['menu_name'] = 'tools'; - $values['route_name'] = 'menu_ui.overview_page'; + $values['route_name'] = 'entity.menu.collection'; $values['title'] = 'Test title'; return parent::createEntity($values, $langcode, $bundle_name); diff --git a/core/modules/menu_ui/menu_ui.info.yml b/core/modules/menu_ui/menu_ui.info.yml index f3bf1beb772cb62a4ccae3a74526e5c017959087..5ac594e24fb2e9e21af74fe69237c227e7270143 100644 --- a/core/modules/menu_ui/menu_ui.info.yml +++ b/core/modules/menu_ui/menu_ui.info.yml @@ -4,6 +4,6 @@ description: 'Allows administrators to customize the site navigation menu.' package: Core version: VERSION core: 8.x -configure: menu_ui.overview_page +configure: entity.menu.collection dependencies: - menu_link_content diff --git a/core/modules/menu_ui/menu_ui.links.action.yml b/core/modules/menu_ui/menu_ui.links.action.yml index 848bcbefdd7e47526cb03a137521d84fd1b58fe9..c82f1eae04c2f53bbfd973150abc102133b0bc08 100644 --- a/core/modules/menu_ui/menu_ui.links.action.yml +++ b/core/modules/menu_ui/menu_ui.links.action.yml @@ -9,4 +9,4 @@ entity.menu.add_form: route_name: entity.menu.add_form title: 'Add menu' appears_on: - - menu_ui.overview_page + - entity.menu.collection diff --git a/core/modules/menu_ui/menu_ui.links.menu.yml b/core/modules/menu_ui/menu_ui.links.menu.yml index 03023356db239f89eb2e2e2e5501dfab78b4e4a4..6142abe4f9432f82a20dea27bb84400f72d31097 100644 --- a/core/modules/menu_ui/menu_ui.links.menu.yml +++ b/core/modules/menu_ui/menu_ui.links.menu.yml @@ -1,5 +1,5 @@ -menu_ui.overview_page: +entity.menu.collection: title: Menus description: 'Add new menus to your site, edit existing menus, and rename and reorganize menu links.' - route_name: menu_ui.overview_page + route_name: entity.menu.collection parent: system.admin_structure diff --git a/core/modules/menu_ui/menu_ui.links.task.yml b/core/modules/menu_ui/menu_ui.links.task.yml index 10dd8d01b9688ced8a604749f303229cec3f9ab7..5fa7af223ddc56299c7a9ebd17de8eada3e9eb18 100644 --- a/core/modules/menu_ui/menu_ui.links.task.yml +++ b/core/modules/menu_ui/menu_ui.links.task.yml @@ -3,7 +3,7 @@ entity.menu.edit_form: route_name: entity.menu.edit_form base_route: entity.menu.edit_form -menu_ui.overview_page: +entity.menu.collection: title: 'List' - route_name: menu_ui.overview_page - base_route: menu_ui.overview_page + route_name: entity.menu.collection + base_route: entity.menu.collection diff --git a/core/modules/menu_ui/menu_ui.module b/core/modules/menu_ui/menu_ui.module index 3656e5fe7c433d017bd562034981c532de19730d..14975f118addc63c95af6f10e3876130be7fcdd0 100644 --- a/core/modules/menu_ui/menu_ui.module +++ b/core/modules/menu_ui/menu_ui.module @@ -39,7 +39,7 @@ function menu_ui_help($route_name, RouteMatchInterface $route_match) { $output .= '' . t('You can enable the newly-created block for this menu on the Block layout page.', array('!blocks' => \Drupal::url('block.admin_display'))) . '
'; } - elseif ($route_name == 'menu_ui.overview_page' && \Drupal::moduleHandler()->moduleExists('block')) { + elseif ($route_name == 'entity.menu.collection' && \Drupal::moduleHandler()->moduleExists('block')) { return '' . t('Each menu has a corresponding block that is managed on the Block layout page.', array('!blocks' => \Drupal::url('block.admin_display'))) . '
'; } } @@ -66,7 +66,8 @@ function menu_ui_entity_type_build(array &$entity_types) { ->setLinkTemplate('add-form', '/admin/structure/menu/add') ->setLinkTemplate('delete-form', '/admin/structure/menu/manage/{menu}/delete') ->setLinkTemplate('edit-form', '/admin/structure/menu/manage/{menu}') - ->setLinkTemplate('add-link-form', '/admin/structure/menu/manage/{menu}/add'); + ->setLinkTemplate('add-link-form', '/admin/structure/menu/manage/{menu}/add') + ->setLinkTemplate('collection', '/admin/structure/menu'); } /** diff --git a/core/modules/menu_ui/menu_ui.routing.yml b/core/modules/menu_ui/menu_ui.routing.yml index 97fd744e261b5db019dadd09035890bacdf0485e..7f94a6d7157f6ed6720c62ce5f61d793515f1e89 100644 --- a/core/modules/menu_ui/menu_ui.routing.yml +++ b/core/modules/menu_ui/menu_ui.routing.yml @@ -1,4 +1,4 @@ -menu_ui.overview_page: +entity.menu.collection: path: '/admin/structure/menu' defaults: _entity_list: 'menu' diff --git a/core/modules/menu_ui/src/Form/MenuDeleteForm.php b/core/modules/menu_ui/src/Form/MenuDeleteForm.php index b2899707de0300fa6fd900fa5d56087abfa0334b..17185d00525e4a0cce7cd5307825908448cc1c10 100644 --- a/core/modules/menu_ui/src/Form/MenuDeleteForm.php +++ b/core/modules/menu_ui/src/Form/MenuDeleteForm.php @@ -93,7 +93,7 @@ public function getConfirmText() { * {@inheritdoc} */ public function submitForm(array &$form, FormStateInterface $form_state) { - $form_state->setRedirect('menu_ui.overview_page'); + $form_state->setRedirectUrl($this->entity->urlInfo('collection')); // Locked menus may not be deleted. if ($this->entity->isLocked()) { diff --git a/core/modules/node/node.info.yml b/core/modules/node/node.info.yml index ab8e3c3c801911f56d37cd004a89204ae3b011fc..cdbef85a4cccd3b280d579f42b945046b3fe6abb 100644 --- a/core/modules/node/node.info.yml +++ b/core/modules/node/node.info.yml @@ -4,7 +4,7 @@ description: 'Allows content to be submitted to the site and displayed on pages. package: Core version: VERSION core: 8.x -configure: node.overview_types +configure: entity.node_type.collection dependencies: - text - entity_reference diff --git a/core/modules/node/node.links.action.yml b/core/modules/node/node.links.action.yml index b7b1577512cfb42a98b2e0ae93ed150276998d40..22079cd60027a9c9b6eaa830829fa05ee28f6336 100644 --- a/core/modules/node/node.links.action.yml +++ b/core/modules/node/node.links.action.yml @@ -2,7 +2,7 @@ node.type_add: route_name: node.type_add title: 'Add content type' appears_on: - - node.overview_types + - entity.node_type.collection node.add_page: route_name: node.add_page title: 'Add content' diff --git a/core/modules/node/node.links.menu.yml b/core/modules/node/node.links.menu.yml index a19749466297cda57f889b6a4b18af875f6fe128..b4edf2348c8f638dd21d45339038d022ca8ab93e 100644 --- a/core/modules/node/node.links.menu.yml +++ b/core/modules/node/node.links.menu.yml @@ -1,8 +1,8 @@ -node.overview_types: +entity.node_type.collection: title: 'Content types' parent: system.admin_structure description: 'Manage content types, including default status, front page promotion, comment settings, etc.' - route_name: node.overview_types + route_name: entity.node_type.collection node.add_page: title: 'Add content' route_name: node.add_page diff --git a/core/modules/node/node.links.task.yml b/core/modules/node/node.links.task.yml index 88271e884a4c2b57bdfa6afaa9a5b05ad6652811..7da46bf961e699ea79a6c5808eab145dbd69df4a 100644 --- a/core/modules/node/node.links.task.yml +++ b/core/modules/node/node.links.task.yml @@ -20,7 +20,7 @@ entity.node_type.edit_form: title: 'Edit' route_name: entity.node_type.edit_form base_route: entity.node_type.edit_form -node.overview_types: +entity.node_type.collection: title: List - route_name: node.overview_types - base_route: node.overview_types + route_name: entity.node_type.collection + base_route: entity.node_type.collection diff --git a/core/modules/node/node.module b/core/modules/node/node.module index a1f2c3b4e685b5470d695c598f8b52172d35f6d3..c14fb14beb1985950799c946e3cf1fca1f3e3dcb 100644 --- a/core/modules/node/node.module +++ b/core/modules/node/node.module @@ -85,7 +85,7 @@ function node_help($route_name, RouteMatchInterface $route_match) { $output .= '' . t('A responsive image mapping associates an image style with each breakpoint defined by your theme.') . '
'; break; @@ -53,7 +53,7 @@ function responsive_image_menu() { 'title' => 'Responsive image mappings', 'description' => 'Manage responsive image mappings', 'weight' => 10, - 'route_name' => 'responsive_image.mapping_page', + 'route_name' => 'entity.responsive_image_mapping.collection', ); $items['admin/config/media/responsive-image-mapping/%responsive_image_mapping'] = array( 'title' => 'Edit responsive image mapping', diff --git a/core/modules/responsive_image/responsive_image.routing.yml b/core/modules/responsive_image/responsive_image.routing.yml index 09b14b5cf35ffa5198c0a0e1fb32539ccf80afa1..2cf9926d29305fe8db7df832e810ebdda1a73a8b 100644 --- a/core/modules/responsive_image/responsive_image.routing.yml +++ b/core/modules/responsive_image/responsive_image.routing.yml @@ -1,4 +1,4 @@ -responsive_image.mapping_page: +entity.responsive_image_mapping.collection: path: '/admin/config/media/responsive-image-mapping' defaults: _entity_list: 'responsive_image_mapping' diff --git a/core/modules/responsive_image/src/Entity/ResponsiveImageMapping.php b/core/modules/responsive_image/src/Entity/ResponsiveImageMapping.php index f866656c90c1772417f18736d14a4ca26074f013..87c08787568711cc75be6b22beea6eba45201d40 100644 --- a/core/modules/responsive_image/src/Entity/ResponsiveImageMapping.php +++ b/core/modules/responsive_image/src/Entity/ResponsiveImageMapping.php @@ -34,7 +34,8 @@ * }, * links = { * "edit-form" = "/admin/config/media/responsive-image-mapping/{responsive_image_mapping}", - * "duplicate-form" = "/admin/config/media/responsive-image-mapping/{responsive_image_mapping}/duplicate" + * "duplicate-form" = "/admin/config/media/responsive-image-mapping/{responsive_image_mapping}/duplicate", + * "collection" = "/admin/config/media/responsive-image-mapping", * } * ) */ diff --git a/core/modules/responsive_image/src/Form/ResponsiveImageMappingDeleteForm.php b/core/modules/responsive_image/src/Form/ResponsiveImageMappingDeleteForm.php index d5526b55e7def79eb95f51a3e121a849d3232e8b..5384134d02992b3c887c2f073f19483d53687368 100644 --- a/core/modules/responsive_image/src/Form/ResponsiveImageMappingDeleteForm.php +++ b/core/modules/responsive_image/src/Form/ResponsiveImageMappingDeleteForm.php @@ -24,7 +24,7 @@ public function getQuestion() { * {@inheritdoc} */ public function getCancelUrl() { - return new Url('responsive_image.mapping_page'); + return $this->entity->urlInfo('collection'); } /** diff --git a/core/modules/responsive_image/src/ResponsiveImageMappingForm.php b/core/modules/responsive_image/src/ResponsiveImageMappingForm.php index 0ad61cae00e3cf5efef101852f9dbd0ee5b0868d..1f47865e38d8c218e7284a01372cd6a1dbbb4260 100644 --- a/core/modules/responsive_image/src/ResponsiveImageMappingForm.php +++ b/core/modules/responsive_image/src/ResponsiveImageMappingForm.php @@ -162,7 +162,7 @@ public function save(array $form, FormStateInterface $form_state) { ); } else { - $form_state->setRedirect('responsive_image.mapping_page'); + $form_state->setRedirectUrl($this->entity->urlInfo('collection')); } } diff --git a/core/modules/search/search.info.yml b/core/modules/search/search.info.yml index 4675b0badb919497a5f612087df685a27e229d38..97b7d3fe7731e4ba8f43d905d91a877fd1bd8ba5 100644 --- a/core/modules/search/search.info.yml +++ b/core/modules/search/search.info.yml @@ -4,4 +4,4 @@ description: 'Enables site-wide keyword searching.' package: Core version: VERSION core: 8.x -configure: search.settings +configure: entity.search_page.collection diff --git a/core/modules/search/search.links.menu.yml b/core/modules/search/search.links.menu.yml index 2bb0a1895e7602059e8a6a57d6e424b9e3b7ea0e..ea5cfaba1c130eeff9aafa6aef766254f3bd7218 100644 --- a/core/modules/search/search.links.menu.yml +++ b/core/modules/search/search.links.menu.yml @@ -2,9 +2,9 @@ search.view: title: Search route_name: search.view enabled: 0 -search.settings: +entity.search_page.collection: title: 'Search pages' parent: system.admin_config_search description: 'Configure search pages and search indexing options.' - route_name: search.settings + route_name: entity.search_page.collection weight: -10 diff --git a/core/modules/search/search.module b/core/modules/search/search.module index 4e62b099663c80fa40862ce0653c68e20061ea6a..e05576d421dd7227e45221a21694030bce7f34eb 100644 --- a/core/modules/search/search.module +++ b/core/modules/search/search.module @@ -78,10 +78,10 @@ function search_help($route_name, RouteMatchInterface $route_match) { $output .= '' . t('The search engine maintains an index of words found in your site\'s content. To build and maintain this index, a correctly configured cron maintenance task is required. Indexing behavior can be adjusted using the settings below.', array('!cron' => \Drupal::url('system.status'))) . '
'; } } diff --git a/core/modules/search/search.routing.yml b/core/modules/search/search.routing.yml index 479ebe8b4d71d3ed9852a1b93eb0d3af614de354..ec273f166882e00e6f159d77c33482b74ecc4b5d 100644 --- a/core/modules/search/search.routing.yml +++ b/core/modules/search/search.routing.yml @@ -1,4 +1,4 @@ -search.settings: +entity.search_page.collection: path: '/admin/config/search/pages' defaults: _entity_list: 'search_page' diff --git a/core/modules/search/src/Controller/SearchController.php b/core/modules/search/src/Controller/SearchController.php index 4e79f79f63a3cbed2f4679307f6d205ae82065db..f3e0e0628e5891b14226d15a1c5559dacc9d644b 100644 --- a/core/modules/search/src/Controller/SearchController.php +++ b/core/modules/search/src/Controller/SearchController.php @@ -191,7 +191,8 @@ public function performOperation(SearchPageInterface $search_page, $op) { drupal_set_message($this->t('The %label search page has been disabled.', array('%label' => $search_page->label()))); } - return $this->redirect('search.settings'); + $url = $search_page->urlInfo('collection'); + return $this->redirect($url->getRouteName(), $url->getRouteParameters(), $url->getOptions()); } /** @@ -208,7 +209,7 @@ public function setAsDefault(SearchPageInterface $search_page) { $this->searchPageRepository->setDefaultSearchPage($search_page); drupal_set_message($this->t('The default search page is now %label. Be sure to check the ordering of your search pages.', array('%label' => $search_page->label()))); - return $this->redirect('search.settings'); + return $this->redirect('entity.search_page.collection'); } } diff --git a/core/modules/search/src/Entity/SearchPage.php b/core/modules/search/src/Entity/SearchPage.php index 1ca1b54b9c5b6015212615ac47e058244ba4ec0d..48379067d6ce7eaafca92ed3424db3e0a93fea6f 100644 --- a/core/modules/search/src/Entity/SearchPage.php +++ b/core/modules/search/src/Entity/SearchPage.php @@ -39,7 +39,8 @@ * "delete-form" = "/admin/config/search/pages/manage/{search_page}/delete", * "enable" = "/admin/config/search/pages/manage/{search_page}/enable", * "disable" = "/admin/config/search/pages/manage/{search_page}/disable", - * "set-default" = "/admin/config/search/pages/manage/{search_page}/set-default" + * "set-default" = "/admin/config/search/pages/manage/{search_page}/set-default", + * "collection" = "/admin/config/search/pages", * }, * config_prefix = "page", * entity_keys = { diff --git a/core/modules/search/src/Form/ReindexConfirm.php b/core/modules/search/src/Form/ReindexConfirm.php index 84948a20ad78739e8b268a35c8c284d10bdf304f..cc4194db1cacadbd89fc1765f84f1abd56590fb7 100644 --- a/core/modules/search/src/Form/ReindexConfirm.php +++ b/core/modules/search/src/Form/ReindexConfirm.php @@ -55,7 +55,7 @@ public function getCancelText() { * {@inheritdoc} */ public function getCancelUrl() { - return new Url('search.settings'); + return new Url('entity.search_page.collection'); } /** diff --git a/core/modules/search/src/Form/SearchPageDeleteForm.php b/core/modules/search/src/Form/SearchPageDeleteForm.php index 5518d59c36f8c4fd727d751a8f67afa7e21b3e23..53974fbc02cb8189f3c984af0e1d0b09d0a71d87 100644 --- a/core/modules/search/src/Form/SearchPageDeleteForm.php +++ b/core/modules/search/src/Form/SearchPageDeleteForm.php @@ -9,7 +9,6 @@ use Drupal\Core\Entity\EntityConfirmFormBase; use Drupal\Core\Form\FormStateInterface; -use Drupal\Core\Url; /** * Provides a deletion confirm form for search. @@ -27,7 +26,7 @@ public function getQuestion() { * {@inheritdoc} */ public function getCancelUrl() { - return new Url('search.settings'); + return $this->entity->urlInfo('collection'); } /** diff --git a/core/modules/search/src/Form/SearchPageFormBase.php b/core/modules/search/src/Form/SearchPageFormBase.php index c2aa6ed41be9cdda08cd2ca11ca712c429826025..95afb4ba962d8686934edc724a68d8aa4ea557a3 100644 --- a/core/modules/search/src/Form/SearchPageFormBase.php +++ b/core/modules/search/src/Form/SearchPageFormBase.php @@ -179,7 +179,7 @@ public function submitForm(array &$form, FormStateInterface $form_state) { public function save(array $form, FormStateInterface $form_state) { $this->entity->save(); - $form_state->setRedirect('search.settings'); + $form_state->setRedirectUrl($this->entity->urlInfo('collection')); } } diff --git a/core/modules/shortcut/shortcut.info.yml b/core/modules/shortcut/shortcut.info.yml index dde0e9c6e1f074d49d3937747bae736c3f4ceb76..f51d30bf476b0f9fb399267bd5935370cfa06e4b 100644 --- a/core/modules/shortcut/shortcut.info.yml +++ b/core/modules/shortcut/shortcut.info.yml @@ -4,4 +4,4 @@ description: 'Allows users to manage customizable lists of shortcut links.' package: Core version: VERSION core: 8.x -configure: shortcut.set_admin +configure: entity.shortcut_set.collection diff --git a/core/modules/shortcut/shortcut.links.action.yml b/core/modules/shortcut/shortcut.links.action.yml index 05b431acfc4b3989e94e5b184e7a69af47933e56..23471d9ec5ae76815910305a5b323047175381ce 100644 --- a/core/modules/shortcut/shortcut.links.action.yml +++ b/core/modules/shortcut/shortcut.links.action.yml @@ -2,7 +2,7 @@ shortcut_set_add_local_action: route_name: shortcut.set_add title: 'Add shortcut set' appears_on: - - shortcut.set_admin + - entity.shortcut_set.collection shortcut.link_add: route_name: shortcut.link_add title: 'Add shortcut' diff --git a/core/modules/shortcut/shortcut.links.menu.yml b/core/modules/shortcut/shortcut.links.menu.yml index 8c9ded56b8d7ef4b0287d5ccd0e5bc57002eeb3e..5e4be81647fd075f03b10e314ff113ed3f5b5af8 100644 --- a/core/modules/shortcut/shortcut.links.menu.yml +++ b/core/modules/shortcut/shortcut.links.menu.yml @@ -1,5 +1,5 @@ -shortcut.set_admin: +entity.shortcut_set.collection: title: Shortcuts description: 'Add and modify shortcut sets.' - route_name: shortcut.set_admin + route_name: entity.shortcut_set.collection parent: system.admin_config_ui diff --git a/core/modules/shortcut/shortcut.module b/core/modules/shortcut/shortcut.module index 88c64dd0af9d3c779485b46b864eec36f28992e7..c095934eae5129525769904805aac39185c512fd 100644 --- a/core/modules/shortcut/shortcut.module +++ b/core/modules/shortcut/shortcut.module @@ -24,7 +24,7 @@ function shortcut_help($route_name, RouteMatchInterface $route_match) { $output .= '' . t('The Shortcut module allows users to create sets of shortcut links to commonly-visited pages of the site. Shortcuts are contained within sets. Each user with Select any shortcut set permission can select a shortcut set created by anyone at the site. For more information, see the online handbook entry for Shortcut module.', array('!shortcut' => 'http://drupal.org/documentation/modules/shortcut')) . '
'; $output .= '' . t('Taxonomy is for categorizing content. Terms are grouped into vocabularies. For example, a vocabulary called "Fruit" would contain the terms "Apple" and "Banana".') . '
'; return $output; diff --git a/core/modules/taxonomy/taxonomy.routing.yml b/core/modules/taxonomy/taxonomy.routing.yml index 6fa970fea14c067a0fb30b4fe72b2313a0f0a164..af86c9e74b67e188b11c40212e35dd58c57021ef 100644 --- a/core/modules/taxonomy/taxonomy.routing.yml +++ b/core/modules/taxonomy/taxonomy.routing.yml @@ -1,4 +1,4 @@ -taxonomy.vocabulary_list: +entity.taxonomy_vocabulary.collection: path: '/admin/structure/taxonomy' defaults: _entity_list: 'taxonomy_vocabulary' diff --git a/core/modules/user/src/Entity/Role.php b/core/modules/user/src/Entity/Role.php index 9bda8d0761825802453cc019c9739803f3354999..b3dcdb58cbef62987718212d402dcba2f83ccad2 100644 --- a/core/modules/user/src/Entity/Role.php +++ b/core/modules/user/src/Entity/Role.php @@ -38,7 +38,8 @@ * links = { * "delete-form" = "/admin/people/roles/manage/{user_role}/delete", * "edit-form" = "/admin/people/roles/manage/{user_role}", - * "edit-permissions-form" = "/admin/people/permissions/{user_role}" + * "edit-permissions-form" = "/admin/people/permissions/{user_role}", + * "collection" = "/admin/people/roles", * } * ) */ diff --git a/core/modules/user/src/Entity/User.php b/core/modules/user/src/Entity/User.php index 98c16419e8878b6f874bf3828dffb8b749257726..81386d76713a2e22deaeb0d76bc8d37c425518f8 100644 --- a/core/modules/user/src/Entity/User.php +++ b/core/modules/user/src/Entity/User.php @@ -54,6 +54,7 @@ * "canonical" = "/user/{user}", * "edit-form" = "/user/{user}/edit", * "cancel-form" = "/user/{user}/cancel", + * "collection" = "/admin/people", * }, * field_ui_base_route = "entity.user.admin_form", * ) diff --git a/core/modules/user/src/Form/UserCancelForm.php b/core/modules/user/src/Form/UserCancelForm.php index d3b69216ee6b969753e4175d6478551a078c05c7..0297e7019bd5c67305a517823b8c320dbface57e 100644 --- a/core/modules/user/src/Form/UserCancelForm.php +++ b/core/modules/user/src/Form/UserCancelForm.php @@ -125,7 +125,7 @@ public function submitForm(array &$form, FormStateInterface $form_state) { if ($this->currentUser()->hasPermission('administer users') && $form_state->isValueEmpty('user_cancel_confirm') && $this->entity->id() != $this->currentUser()->id()) { user_cancel($form_state->getValues(), $this->entity->id(), $form_state->getValue('user_cancel_method')); - $form_state->setRedirect('user.admin_account'); + $form_state->setRedirectUrl($this->entity->urlInfo('collection')); } else { // Store cancelling method and whether to notify the user in diff --git a/core/modules/user/src/Form/UserMultipleCancelConfirm.php b/core/modules/user/src/Form/UserMultipleCancelConfirm.php index 45f340fdd4ff1c22ff19419269ddeecd09f496f8..da26ee78ea937191809e6a9d5ec7660f46ccbc93 100644 --- a/core/modules/user/src/Form/UserMultipleCancelConfirm.php +++ b/core/modules/user/src/Form/UserMultipleCancelConfirm.php @@ -87,7 +87,7 @@ public function getQuestion() { * {@inheritdoc} */ public function getCancelUrl() { - return new Url('user.admin_account'); + return new Url('entity.user.collection'); } /** @@ -106,7 +106,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { ->get('user_user_operations_cancel') ->get($this->currentUser()->id()); if (!$accounts) { - return $this->redirect('user.admin_account'); + return $this->redirect('entity.user.collection'); } $form['accounts'] = array('#prefix' => '' . t("This web page allows administrators to register new users. Users' email addresses and usernames must be unique.") . '
'; case 'user.admin_permissions': - return '' . t('Permissions let you control what users can do and see on your site. You can define a specific set of permissions for each role. (See the Roles page to create a role.) Any permissions granted to the Authenticated user role will be given to any user who is logged in to your site. From the Account settings page, you can make any role into an Administrator role for the site, meaning that role will be granted all new permissions automatically. You should be careful to ensure that only trusted users are given this access and level of control of your site.', array('!role' => \Drupal::url('user.role_list'), '!settings' => \Drupal::url('entity.user.admin_form'))) . '
'; + return '' . t('Permissions let you control what users can do and see on your site. You can define a specific set of permissions for each role. (See the Roles page to create a role.) Any permissions granted to the Authenticated user role will be given to any user who is logged in to your site. From the Account settings page, you can make any role into an Administrator role for the site, meaning that role will be granted all new permissions automatically. You should be careful to ensure that only trusted users are given this access and level of control of your site.', array('!role' => \Drupal::url('entity.user_role.collection'), '!settings' => \Drupal::url('entity.user.admin_form'))) . '
'; - case 'user.role_list': + case 'entity.user_role.collection': return '' . t('A role defines a group of users that have certain privileges. These privileges are defined on the Permissions page. Here, you can define the names and the display sort order of the roles on your site. It is recommended to order roles from least permissive (for example, Anonymous user) to most permissive (for example, Administrator user). Users who are not logged in have the Anonymous user role. Users who are logged in have the Authenticated user role, plus any other roles granted to their user account.', array('!permissions' => \Drupal::url('user.admin_permissions'))) . '
'; case 'entity.user.field_ui_fields': diff --git a/core/modules/user/user.routing.yml b/core/modules/user/user.routing.yml index e96c76c85ead42df6b2ae25cd30444b018dd472e..4f6a263555686887c75156bccf3904ea2825a326 100644 --- a/core/modules/user/user.routing.yml +++ b/core/modules/user/user.routing.yml @@ -43,7 +43,7 @@ entity.user.admin_form: requirements: _permission: 'administer account settings' -user.admin_account: +entity.user.collection: path: '/admin/people' defaults: _entity_list: 'user' @@ -83,7 +83,7 @@ user.multiple_cancel_confirm: requirements: _permission: 'administer users' -user.role_list: +entity.user_role.collection: path: '/admin/people/roles' defaults: _entity_list: 'user_role' diff --git a/core/modules/views/src/Plugin/entity_reference/selection/ViewsSelection.php b/core/modules/views/src/Plugin/entity_reference/selection/ViewsSelection.php index 139f2f666905a37b670ee46755cf185cf1fd883e..f933ea217ca7c29a3336766804d92dd713818813 100644 --- a/core/modules/views/src/Plugin/entity_reference/selection/ViewsSelection.php +++ b/core/modules/views/src/Plugin/entity_reference/selection/ViewsSelection.php @@ -106,7 +106,7 @@ public static function settingsForm(FieldDefinitionInterface $field_definition) $form['view']['no_view_help'] = array( '#markup' => '' . t('No eligible views were found. Create a view with an Entity Reference display, or add such a display to an existing view.', array( '@create' => \Drupal::url('views_ui.add'), - '@existing' => \Drupal::url('views_ui.list'), + '@existing' => \Drupal::url('entity.view.collection'), )) . '
', ); } diff --git a/core/modules/views_ui/src/Controller/ViewsUIController.php b/core/modules/views_ui/src/Controller/ViewsUIController.php index b73333cd145eff0594a8daff55c71839f10e0aeb..b797619ed2077baa2b6f1fc34b7619fdda2b9193 100644 --- a/core/modules/views_ui/src/Controller/ViewsUIController.php +++ b/core/modules/views_ui/src/Controller/ViewsUIController.php @@ -163,7 +163,7 @@ public function ajaxOperation(ViewEntityInterface $view, $op, Request $request) } // Otherwise, redirect back to the page. - return $this->redirect('views_ui.list'); + return $this->redirect('entity.view.collection'); } /** diff --git a/core/modules/views_ui/src/ViewAddForm.php b/core/modules/views_ui/src/ViewAddForm.php index d4c9410959ebc26ca2b186ef008775aec363f594..845bd676be9c15b98164ac002c34aa30e4cf413c 100644 --- a/core/modules/views_ui/src/ViewAddForm.php +++ b/core/modules/views_ui/src/ViewAddForm.php @@ -188,7 +188,7 @@ public function submitForm(array &$form, FormStateInterface $form_state) { // @todo Figure out whether it really makes sense to throw and catch exceptions on the wizard. catch (WizardException $e) { drupal_set_message($e->getMessage(), 'error'); - $form_state->setRedirect('views_ui.list'); + $form_state->setRedirect('entity.view.collection'); return; } $this->entity->save(); @@ -205,7 +205,7 @@ public function submitForm(array &$form, FormStateInterface $form_state) { * The current state of the form. */ public function cancel(array $form, FormStateInterface $form_state) { - $form_state->setRedirect('views_ui.list'); + $form_state->setRedirect('entity.view.collection'); } } diff --git a/core/modules/views_ui/src/ViewDeleteForm.php b/core/modules/views_ui/src/ViewDeleteForm.php index 918b2eff1fab6ad1e12f10c6a957cb05138e1a14..3c593ea3b37723fe772cda778e9b1f6fea266696 100644 --- a/core/modules/views_ui/src/ViewDeleteForm.php +++ b/core/modules/views_ui/src/ViewDeleteForm.php @@ -9,7 +9,6 @@ use Drupal\Core\Entity\EntityConfirmFormBase; use Drupal\Core\Form\FormStateInterface; -use Drupal\Core\Url; /** * Provides a delete form for a view. @@ -27,7 +26,7 @@ public function getQuestion() { * {@inheritdoc} */ public function getCancelUrl() { - return new Url('views_ui.list'); + return $this->entity->urlInfo('collection'); } /** diff --git a/core/modules/views_ui/src/ViewEditForm.php b/core/modules/views_ui/src/ViewEditForm.php index 428775f35a38cb5385b8bbd500e96a200f86307b..cdacd9c17a1e98e62288ceb9b0e0fa6318473973 100644 --- a/core/modules/views_ui/src/ViewEditForm.php +++ b/core/modules/views_ui/src/ViewEditForm.php @@ -342,7 +342,7 @@ public function cancel(array $form, FormStateInterface $form_state) { // Remove this view from cache so edits will be lost. $view = $this->entity; $this->tempStore->delete($view->id()); - $form_state->setRedirect('views_ui.list'); + $form_state->setRedirectUrl($this->entity->urlInfo('collection')); } /** diff --git a/core/modules/views_ui/views_ui.info.yml b/core/modules/views_ui/views_ui.info.yml index 0230b6eaf6ce8003d97d6b64cd2e1b7d756969ef..71770b8950949c4a73c447f8aa00384a65e64792 100644 --- a/core/modules/views_ui/views_ui.info.yml +++ b/core/modules/views_ui/views_ui.info.yml @@ -4,6 +4,6 @@ description: 'Administrative interface for Views.' package: Core version: VERSION core: 8.x -configure: views_ui.list +configure: entity.view.collection dependencies: - views diff --git a/core/modules/views_ui/views_ui.links.action.yml b/core/modules/views_ui/views_ui.links.action.yml index 6a0ded0d267c70d89b2858c240c63e67c5d6afec..6a3c93619eaeb255eaa2c9820b6110d8e90390da 100644 --- a/core/modules/views_ui/views_ui.links.action.yml +++ b/core/modules/views_ui/views_ui.links.action.yml @@ -2,4 +2,4 @@ views_add_local_action: route_name: views_ui.add title: 'Add new view' appears_on: - - views_ui.list + - entity.view.collection diff --git a/core/modules/views_ui/views_ui.links.menu.yml b/core/modules/views_ui/views_ui.links.menu.yml index e799469bb9036f1f91edf6bb172dad14ad7ebe96..3f38307b3f9bfd6a87a8685bf72a41827d16eb18 100644 --- a/core/modules/views_ui/views_ui.links.menu.yml +++ b/core/modules/views_ui/views_ui.links.menu.yml @@ -1,8 +1,8 @@ -views_ui.list: +entity.view.collection: title: Views parent: system.admin_structure description: 'Manage customized lists of content.' - route_name: views_ui.list + route_name: entity.view.collection views_ui.reports_plugins: title: 'Views plugins' parent: system.admin_reports diff --git a/core/modules/views_ui/views_ui.links.task.yml b/core/modules/views_ui/views_ui.links.task.yml index c7fe8b00101f98f3117c8ea97d1716e0b761c7a9..91b8c87b4a2edddb7a5154795860cc0279121345 100644 --- a/core/modules/views_ui/views_ui.links.task.yml +++ b/core/modules/views_ui/views_ui.links.task.yml @@ -1,7 +1,7 @@ views_ui.settings_tab: route_name: views_ui.settings_basic title: Settings - base_route: views_ui.list + base_route: entity.view.collection views_ui.settings_basic_tab: route_name: views_ui.settings_basic @@ -15,14 +15,14 @@ views_ui.settings_advanced_tab: weight: 10 views_ui.list_tab: - route_name: views_ui.list + route_name: entity.view.collection title: List - base_route: views_ui.list + base_route: entity.view.collection views_ui.reports_fields: route_name: views_ui.reports_fields title: 'Used in views' - base_route: field_ui.list + base_route: entity.field_storage_config.collection entity.view.edit_form: title: 'Edit' diff --git a/core/modules/views_ui/views_ui.module b/core/modules/views_ui/views_ui.module index c0049feb03fd1c2bdc3d61676dfddf412b9e15ce..5ac6790a3fe711c4180f1780b5f0452a6f7907be 100644 --- a/core/modules/views_ui/views_ui.module +++ b/core/modules/views_ui/views_ui.module @@ -28,9 +28,9 @@ function views_ui_help($route_name, RouteMatchInterface $route_match) { $output .= '