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('Uses') . '

'; $output .= '
'; $output .= '
' . t('Using simple actions') . '
'; - $output .= '
' . t('Simple actions do not require configuration and are listed automatically as available on the Actions page.', array('!actions' => \Drupal::url('action.admin'))) . '
'; + $output .= '
' . t('Simple actions do not require configuration and are listed automatically as available on the Actions page.', array('!actions' => \Drupal::url('entity.action.collection'))) . '
'; $output .= '
' . t('Creating and configuring advanced actions') . '
'; - $output .= '
' . t('Advanced actions are user-created and have to be configured individually. Create an advanced action on the Actions page by selecting an action type from the drop-down list. Then configure your action, for example by specifying the recipient of an automated email message.', array('!actions' => \Drupal::url('action.admin'))) . '
'; + $output .= '
' . t('Advanced actions are user-created and have to be configured individually. Create an advanced action on the Actions page by selecting an action type from the drop-down list. Then configure your action, for example by specifying the recipient of an automated email message.', array('!actions' => \Drupal::url('entity.action.collection'))) . '
'; $output .= '
'; return $output; - case 'action.admin': + case 'entity.action.collection': $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('About') . '

'; - $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('Uses') . '

'; $output .= '
'; $output .= '
' . t('Creating and managing custom block types') . '
'; - $output .= '
' . t('Users with the Administer blocks permission can create different custom block types, each with different fields and display settings, from the Custom block types page. The Custom block types page lists all of your created custom block types, and allows you to edit and manage them. For more information about managing fields and display settings, see the Field UI module help.', array('!types' => \Drupal::url('block_content.type_list'), '!field-ui' => \Drupal::url('help.page', array('name' => 'field_ui')))) . '
'; + $output .= '
' . t('Users with the Administer blocks permission can create different custom block types, each with different fields and display settings, from the Custom block types page. The Custom block types page lists all of your created custom block types, and allows you to edit and manage them. For more information about managing fields and display settings, see the Field UI module help.', array('!types' => \Drupal::url('entity.block_content_type.collection'), '!field-ui' => \Drupal::url('help.page', array('name' => 'field_ui')))) . '
'; $output .= '
' . t('Creating custom blocks') . '
'; $output .= '
' . t('Users with the Administer blocks permission can add custom blocks of each of their defined custom block types. Created custom blocks are then listed on the Blocks administration page.', array('!blocks' => \Drupal::url('block.admin_display'), '!block-add' => \Drupal::url('block_content.add_page'))) . '
'; $output .= '
'; return $output; - case 'block_content.list': + case 'entity.block_content.collection': $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('Uses') . '

'; $output .= '
'; $output .= '
' . t('Enabling commenting and configuring defaults') . '
'; - $output .= '
' . t('Comment functionality can be enabled for any entity sub-type (for example, a content type). On the Manage fields page for each entity sub-type, you can enable commenting by adding a Comments field. The entity sub-types each have their own default comment settings configured as: Open to allow new comments, Closed to view existing comments, but prevent new comments, or Hidden to hide existing comments and prevent new comments. For background information about entities, see the Field module help page.', array('!content-type' => \Drupal::url('node.overview_types'), '!field' => \Drupal::url('help.page', array('name' => 'field')))) . '
'; + $output .= '
' . t('Comment functionality can be enabled for any entity sub-type (for example, a content type). On the Manage fields page for each entity sub-type, you can enable commenting by adding a Comments field. The entity sub-types each have their own default comment settings configured as: Open to allow new comments, Closed to view existing comments, but prevent new comments, or Hidden to hide existing comments and prevent new comments. For background information about entities, see the Field module help page.', array('!content-type' => \Drupal::url('entity.node_type.collection'), '!field' => \Drupal::url('help.page', array('name' => 'field')))) . '
'; $output .= '
' . t('Overriding default settings') . '
'; $output .= '
' . t('When you create an entity item, you can override the default comment settings. Changing the entity sub-type defaults will not affect existing entity items, whether they used the default settings or had overrides.') . '
'; $output .= '
' . t('Approving and managing comments') . '
'; @@ -77,7 +77,7 @@ function comment_help($route_name, RouteMatchInterface $route_match) { $output .= '
'; return $output; - case 'comment.type_list': + case 'entity.comment_type.collection': $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('Uses') . '

'; $output .= '
'; $output .= '
' . t('Enabling translation') . '
'; - $output .= '
' . t('In order to translate configuration, the website must have at least two languages.', array('!url' => \Drupal::url('language.admin_overview'))) . '
'; + $output .= '
' . t('In order to translate configuration, the website must have at least two languages.', array('!url' => \Drupal::url('entity.configurable_language.collection'))) . '
'; $output .= '
' . t('Translating configuration text') . '
'; $output .= '
' . t('Users with the Translate user edited configuration permission can access the configuration translation overview, and manage translations for specific languages. The Configuration translation page shows a list of all configuration text that can be translated, either as individual items or as lists. After you click on Translate, you are provided with a list of all languages. You can add or edit a translation for a specific language. Users with specific configuration permissions can also edit the text for the site\'s default language. For some configuration text items (for example for the site information), the specific translation pages can also be accessed directly from their configuration pages.', array('!translation-page' => \Drupal::url('config_translation.mapper_list'))) . '
'; $output .= '
' . t('Translating date formats') . '
'; diff --git a/core/modules/contact/contact.info.yml b/core/modules/contact/contact.info.yml index a50d17dd86a43c445ef0f02a25fef3899e4d0fed..2507fbd167c8fc36984ac7252e42e29c10e515a3 100644 --- a/core/modules/contact/contact.info.yml +++ b/core/modules/contact/contact.info.yml @@ -4,4 +4,4 @@ description: 'Enables the use of both personal and site-wide contact forms.' package: Core version: VERSION core: 8.x -configure: contact.form_list +configure: entity.contact_form.collection diff --git a/core/modules/contact/contact.links.action.yml b/core/modules/contact/contact.links.action.yml index 78e139a7ddcd6ca9c49f0c1df9051e10f2bec3ad..a191f806289ef6e7b13b48ef90f93ed3c4d87e75 100644 --- a/core/modules/contact/contact.links.action.yml +++ b/core/modules/contact/contact.links.action.yml @@ -3,4 +3,4 @@ contact.form_add: title: 'Add contact form' weight: 1 appears_on: - - contact.form_list + - entity.contact_form.collection diff --git a/core/modules/contact/contact.links.menu.yml b/core/modules/contact/contact.links.menu.yml index 92c15d0b0f8b57fb50d8e89a9a56648e11d5f198..45db457a03847ec1e67a6364802f70ee1f285ff8 100644 --- a/core/modules/contact/contact.links.menu.yml +++ b/core/modules/contact/contact.links.menu.yml @@ -1,8 +1,8 @@ -contact.form_list: +entity.contact_form.collection: title: 'Contact forms' parent: system.admin_structure description: 'Create and manage contact forms.' - route_name: contact.form_list + route_name: entity.contact_form.collection contact.site_page: title: Contact route_name: contact.site_page diff --git a/core/modules/contact/contact.module b/core/modules/contact/contact.module index 970032112a292af81c01442107576b15010e0cae..921e017408d43c3a46c075a00e3fab1894df0bb0 100644 --- a/core/modules/contact/contact.module +++ b/core/modules/contact/contact.module @@ -24,15 +24,15 @@ function contact_help($route_name, RouteMatchInterface $route_match) { $output .= '
' . t('Site-wide contact forms') . '
'; $output .= '
' . t('The Contact page provides a simple form for users with the Use the site-wide contact form permission to send comments, feedback, or other requests. You can create forms for directing the contact messages to a set of defined recipients. Common forms for a business site, for example, might include "Website feedback" (messages are forwarded to website administrators) and "Product information" (messages are forwarded to members of the sales department). Email addresses defined within a form are not displayed publicly.', array('@contact' => \Drupal::url('contact.site_page'))) . '

'; $output .= '
' . t('Navigation') . '
'; - $output .= '
' . t('When the site-wide contact form is enabled, a link in the Footer menu is created, which you can modify on the Menus administration page.', array('@menu' => \Drupal::url('menu_ui.overview_page'))) . '
'; + $output .= '
' . t('When the site-wide contact form is enabled, a link in the Footer menu is created, which you can modify on the Menus administration page.', array('@menu' => \Drupal::url('entity.menu.collection'))) . '
'; $output .= '
' . t('Customization') . '
'; $output .= '
' . t('If you would like additional text to appear on the site-wide or personal contact page, use a block. You can create and edit blocks on the Blocks administration page.', array('@blocks' => \Drupal::url('block.admin_display'))) . '
'; $output .= '
'; return $output; - case 'contact.form_list': + case 'entity.contact_form.collection': $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('Uses') . '

'; $output .= '
'; $output .= '
' . t('Enabling translation') . '
'; - $output .= '
' . t('In order to translate content, the website must have at least two languages. When that is the case, you can enable translation for the desired content entities on the Content language page. When enabling translation you can choose the default language for content and decide whether to show the language selection field on the content editing forms.', array('!url' => \Drupal::url('language.admin_overview'), '!translation-entity' => \Drupal::url('language.content_settings_page'), '!language-help' => \Drupal::url('help.page', array('name' => 'language')))) . '
'; + $output .= '
' . t('In order to translate content, the website must have at least two languages. When that is the case, you can enable translation for the desired content entities on the Content language page. When enabling translation you can choose the default language for content and decide whether to show the language selection field on the content editing forms.', array('!url' => \Drupal::url('entity.configurable_language.collection'), '!translation-entity' => \Drupal::url('language.content_settings_page'), '!language-help' => \Drupal::url('help.page', array('name' => 'language')))) . '
'; $output .= '
' . t('Enabling field translation') . '
'; $output .= '
' . t('You can define which fields of a content entity can be translated. For example, you might want to translate the title and body field while leaving the image field untranslated. If you exclude a field from being translated, it will still show up in the content editing form, but any changes made to that field will be applied to all translations of that content.') . '
'; $output .= '
' . t('Translating content') . '
'; @@ -40,7 +40,7 @@ function content_translation_help($route_name, RouteMatchInterface $route_match) case 'language.content_settings_page': $output = ''; if (!\Drupal::languageManager()->isMultilingual()) { - $output .= '
' . t('Before you can translate content, there must be at least two languages added on the languages administration page.', array('!url' => \Drupal::url('language.admin_overview'))); + $output .= '
' . t('Before you can translate content, there must be at least two languages added on the languages administration page.', array('!url' => \Drupal::url('entity.configurable_language.collection'))); } return $output; } diff --git a/core/modules/datetime/datetime.module b/core/modules/datetime/datetime.module index 42c88533be11bdbb48bdbab58231c97dbe9ebb11..113d9e7e931aeb5e6447825ae7b55a67e62fdd87 100644 --- a/core/modules/datetime/datetime.module +++ b/core/modules/datetime/datetime.module @@ -39,7 +39,7 @@ function datetime_help($route_name, RouteMatchInterface $route_match) { $output .= '
' . t('Managing and displaying date fields') . '
'; $output .= '
' . t('The settings and the display of the Date field can be configured separately. See the Field UI help for more information on how to manage fields and their display.', array('!field_ui' => \Drupal::url('help.page', array('name' => 'field_ui')))) . '
'; $output .= '
' . t('Displaying dates') . '
'; - $output .= '
' . t('Dates can be displayed using the Plain or the Default formatter. The Plain formatter displays the date in the ISO 8601 format. If you choose the Default formatter, you can choose a format from a predefined list that can be managed on the Date and time formats page.', array('!date_format_list'=> \Drupal::url('system.date_format_list'))) . '
'; + $output .= '
' . t('Dates can be displayed using the Plain or the Default formatter. The Plain formatter displays the date in the ISO 8601 format. If you choose the Default formatter, you can choose a format from a predefined list that can be managed on the Date and time formats page.', array('!date_format_list'=> \Drupal::url('entity.date_format.collection'))) . '
'; $output .= '
'; return $output; } diff --git a/core/modules/field_ui/field_ui.links.action.yml b/core/modules/field_ui/field_ui.links.action.yml index b03bac5c654a6a06f1c39330bfa8d73ea0504520..45238431af9d52984d348c48f06df8050b4e8ba6 100644 --- a/core/modules/field_ui/field_ui.links.action.yml +++ b/core/modules/field_ui/field_ui.links.action.yml @@ -3,14 +3,14 @@ field_ui.entity_view_mode_add: title: 'Add new view mode' weight: 1 appears_on: - - field_ui.entity_view_mode_list + - entity.entity_view_mode.collection field_ui.entity_form_mode_add: route_name: field_ui.entity_form_mode_add title: 'Add new form mode' weight: 1 appears_on: - - field_ui.entity_form_mode_list + - entity.entity_form_mode.collection field_ui.field_storage_config_add: class: \Drupal\Core\Menu\LocalActionDefault diff --git a/core/modules/field_ui/field_ui.links.menu.yml b/core/modules/field_ui/field_ui.links.menu.yml index 1d3fdb0d239bfd3b3e30d60d71c7d50cacd746c6..f3ed5184116320b96cb8bef8a013ae5b662bd67c 100644 --- a/core/modules/field_ui/field_ui.links.menu.yml +++ b/core/modules/field_ui/field_ui.links.menu.yml @@ -1,7 +1,7 @@ -field_ui.list: +entity.field_storage_config.collection: title: 'Field list' description: 'Overview of fields on all entity types.' - route_name: field_ui.list + route_name: entity.field_storage_config.collection parent: system.admin_reports field_ui.display_mode: @@ -10,14 +10,14 @@ field_ui.display_mode: route_name: field_ui.display_mode parent: system.admin_structure -field_ui.entity_view_mode_list: +entity.entity_view_mode.collection: title: 'View modes' description: 'Manage custom view modes.' - route_name: field_ui.entity_view_mode_list + route_name: entity.entity_view_mode.collection parent: field_ui.display_mode -field_ui.entity_form_mode_list: +entity.entity_form_mode.collection: title: 'Form modes' description: 'Manage custom form modes.' - route_name: field_ui.entity_form_mode_list + route_name: entity.entity_form_mode.collection parent: field_ui.display_mode diff --git a/core/modules/field_ui/field_ui.links.task.yml b/core/modules/field_ui/field_ui.links.task.yml index 7bb8f5439c05d2c4a868e316dcf9c294f79fe6f3..5ee3eff20d5bcba3db291494e0b467238091d746 100644 --- a/core/modules/field_ui/field_ui.links.task.yml +++ b/core/modules/field_ui/field_ui.links.task.yml @@ -1,7 +1,7 @@ -field_ui.list: +entity.field_storage_config.collection: title: Entities - route_name: field_ui.list - base_route: field_ui.list + route_name: entity.field_storage_config.collection + base_route: entity.field_storage_config.collection field_ui.fields: class: \Drupal\Core\Menu\LocalTaskDefault @@ -17,12 +17,12 @@ field_ui.entity_form_mode.edit_form: route_name: field_ui.entity_form_mode.edit_form base_route: field_ui.entity_form_mode.edit_form -field_ui.entity_view_mode_list: +entity.entity_view_mode.collection: title: List - route_name: field_ui.entity_view_mode_list - base_route: field_ui.entity_view_mode_list + route_name: entity.entity_view_mode.collection + base_route: entity.entity_view_mode.collection -field_ui.entity_form_mode_list: +entity.entity_form_mode.collection: title: List - route_name: field_ui.entity_form_mode_list - base_route: field_ui.entity_form_mode_list + route_name: entity.entity_form_mode.collection + base_route: entity.entity_form_mode.collection diff --git a/core/modules/field_ui/field_ui.module b/core/modules/field_ui/field_ui.module index 8864befe4a2cf1034d4f5368fad2dbd6e4f53f62..e305b79c35204f989fe60fd840c5b57768d28cf4 100644 --- a/core/modules/field_ui/field_ui.module +++ b/core/modules/field_ui/field_ui.module @@ -36,13 +36,13 @@ function field_ui_help($route_name, RouteMatchInterface $route_match) { $output .= '
' . t('Configuring field display') . '
'; $output .= '
' . t('On the Manage display page of your entity type or sub-type, you can configure how each field is displayed by default and in each view mode. If your entity type has multiple view modes, you can toggle between the view modes at the top of the page, and you can toggle whether each view mode uses the default settings or custom settings in the Custom display settings section. For each field in each view mode, you can choose whether and how to display the label of the field from the Label drop-down list. You can also select the formatter to use for display; some formatters have configuration options, which you can edit using the Edit button (which looks like a wheel). You can also change the display order of fields. You can exclude a field from a specific view mode by choosing Hidden from the formatter drop-down list, or by dragging it into the Disabled section.') . '
'; $output .= '
' . t('Configuring view and form modes') . '
'; - $output .= '
' . t('You can add, edit, and delete view modes for entities on the View modes page, and you can add, edit, and delete form modes for entities on the Form modes page. Once you have defined a view mode or form mode for an entity type, it will be available on the Manage display or Manage form display page for each sub-type of that entity.', array('!view_modes' => \Drupal::url('field_ui.entity_view_mode_list'), '!form_modes' => \Drupal::url('field_ui.entity_form_mode_list'))) . '
'; + $output .= '
' . t('You can add, edit, and delete view modes for entities on the View modes page, and you can add, edit, and delete form modes for entities on the Form modes page. Once you have defined a view mode or form mode for an entity type, it will be available on the Manage display or Manage form display page for each sub-type of that entity.', array('!view_modes' => \Drupal::url('entity.entity_view_mode.collection'), '!form_modes' => \Drupal::url('entity.entity_form_mode.collection'))) . '
'; $output .= '
' . t('Listing fields') . '
'; - $output .= '
' . t('There are two reports available that list the fields defined on your site. The Entities report lists all your fields, showing the field machine names, types, and the entity types or sub-types they are used on (each sub-type links to the Manage fields page). If the Views and Views UI modules are enabled, the Used in views report lists each field that is used in a view, with a link to edit that view.', array('!entity-list' => \Drupal::url('field_ui.list'), '!views-list' => (\Drupal::moduleHandler()->moduleExists('views_ui')) ? \Drupal::url('views_ui.reports_fields') : '#', '!views' => (\Drupal::moduleHandler()->moduleExists('views')) ? \Drupal::url('help.page', array('name' => 'views')) : '#','!views-ui' => (\Drupal::moduleHandler()->moduleExists('views_ui')) ? \Drupal::url('help.page', array('name' => 'views_ui')) : '#')) . '
'; + $output .= '
' . t('There are two reports available that list the fields defined on your site. The Entities report lists all your fields, showing the field machine names, types, and the entity types or sub-types they are used on (each sub-type links to the Manage fields page). If the Views and Views UI modules are enabled, the Used in views report lists each field that is used in a view, with a link to edit that view.', array('!entity-list' => \Drupal::url('entity.field_storage_config.collection'), '!views-list' => (\Drupal::moduleHandler()->moduleExists('views_ui')) ? \Drupal::url('views_ui.reports_fields') : '#', '!views' => (\Drupal::moduleHandler()->moduleExists('views')) ? \Drupal::url('help.page', array('name' => 'views')) : '#','!views-ui' => (\Drupal::moduleHandler()->moduleExists('views_ui')) ? \Drupal::url('help.page', array('name' => 'views_ui')) : '#')) . '
'; $output .= ''; return $output; - case 'field_ui.list': + case 'entity.field_storage_config.collection': return '

' . 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('Uses') . '

'; $output .= '
'; $output .= '
' . t('Manipulating images') . '
'; - $output .= '
' . t('With the Image module you can scale, crop, resize, rotate and desaturate images without affecting the original image using image styles. When you change an image style, the module automatically refreshes all created images. Every image style must have a name, which will be used in the URL of the generated images. There are two common approaches to naming image styles (which you use will depend on how the image style is being applied):',array('@image' => \Drupal::url('image.style_list'))); + $output .= '
' . t('With the Image module you can scale, crop, resize, rotate and desaturate images without affecting the original image using image styles. When you change an image style, the module automatically refreshes all created images. Every image style must have a name, which will be used in the URL of the generated images. There are two common approaches to naming image styles (which you use will depend on how the image style is being applied):',array('@image' => \Drupal::url('entity.image_style.collection'))); $output .= ''; $output .= t('After you create an image style, you can add effects: crop, scale, resize, rotate, and desaturate (other contributed modules provide additional effects). For example, by combining effects as crop, scale, and desaturate, you can create square, grayscale thumbnails.') . '
'; $output .= '
' . t('Attaching images to content as fields') . '
'; - $output .= '
' . t("Image module also allows you to attach images to content as fields. To add an image field to a content type, go to the content type's manage fields page, and add a new field of type Image. Attaching images to content this way allows image styles to be applied and maintained, and also allows you more flexibility when theming.", array('@content-type' => \Drupal::url('node.overview_types'))) . '
'; + $output .= '
' . t("Image module also allows you to attach images to content as fields. To add an image field to a content type, go to the content type's manage fields page, and add a new field of type Image. Attaching images to content this way allows image styles to be applied and maintained, and also allows you more flexibility when theming.", array('@content-type' => \Drupal::url('entity.node_type.collection'))) . '
'; $output .= '
' . t('Configuring image fields for accessibility') . '
'; $output .= '
' . t('For accessibility and search engine optimization, all images that convey meaning on web sites should have alternate text. Drupal also allows entry of title text for images, but it can lead to confusion for screen reader users and its use is not recommended. Image fields can be configured so that alternate and title text fields are enabled or disabled; if enabled, the fields can be set to be required. The recommended setting is to enable and require alternate text and disable title text.') . '
'; $output .= '
'; return $output; - case 'image.style_list': + case 'entity.image_style.collection': return '

' . 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('Uses') . '

'; $output .= '
'; $output .= '
' . t('Adding languages') . '
'; - $output .= '
' . t('You can add languages on the Languages page by selecting Add language and choosing a language from the drop-down menu. This language is then displayed in the languages list, where it can be configured further. If the Interface translation module is enabled, and the translation server is set as a translation source, then the interface translation for this language is automatically downloaded as well.' , array('!language_list' => \Drupal::url('language.admin_overview'), '!interface' => (\Drupal::moduleHandler()->moduleExists('locale')) ? \Drupal::url('help.page', array('name' => 'locale')) : '#')) . '
'; + $output .= '
' . t('You can add languages on the Languages page by selecting Add language and choosing a language from the drop-down menu. This language is then displayed in the languages list, where it can be configured further. If the Interface translation module is enabled, and the translation server is set as a translation source, then the interface translation for this language is automatically downloaded as well.' , array('!language_list' => \Drupal::url('entity.configurable_language.collection'), '!interface' => (\Drupal::moduleHandler()->moduleExists('locale')) ? \Drupal::url('help.page', array('name' => 'locale')) : '#')) . '
'; $output .= '
' . t('Adding custom languages') . '
'; $output .= '
' . t('You can add a language that is not provided in the drop-down list by choosing Custom language at the end of the list. You then have to configure its language code, name, and direction in the form provided.') . '
'; $output .= '
' . t('Configuring content languages') . '
'; @@ -48,13 +48,13 @@ function language_help($route_name, RouteMatchInterface $route_match) { $output .= ''; $output .= '
'; return $output; - case 'language.admin_overview': + case 'entity.configurable_language.collection': return '

' . 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('Uses') . '

'; $output .= '
'; $output .= '
' . t('Importing translation files') . '
'; - $output .= '
' . t('Translation files with translated interface text are imported automatically when languages are added on the Languages page, or when modules or themes are enabled. On the Settings page, the Translation source can be restricted to local files only, or to include the Drupal translation server. Although modules and themes may not be fully translated in all languages, new translations become available frequently. You can specify whether and how often to check for translation file updates and whether to overwrite existing translations on the Settings page. You can also manually import a translation file on the Import page.', array('!import' => \Drupal::url('locale.translate_import'), '!locale-settings' => \Drupal::url('locale.settings'), '!languages' => \Drupal::url('language.admin_overview'), '!server' => 'https://localize.drupal.org')) . '
'; + $output .= '
' . t('Translation files with translated interface text are imported automatically when languages are added on the Languages page, or when modules or themes are enabled. On the Settings page, the Translation source can be restricted to local files only, or to include the Drupal translation server. Although modules and themes may not be fully translated in all languages, new translations become available frequently. You can specify whether and how often to check for translation file updates and whether to overwrite existing translations on the Settings page. You can also manually import a translation file on the Import page.', array('!import' => \Drupal::url('locale.translate_import'), '!locale-settings' => \Drupal::url('locale.settings'), '!languages' => \Drupal::url('entity.configurable_language.collection'), '!server' => 'https://localize.drupal.org')) . '
'; $output .= '
' . t('Checking the translation status') . '
'; - $output .= '
' . t('You can check how much of the interface on your site is translated into which language on the Languages page. On the Available translation updates page, you can check whether interface translation updates are available on the Drupal translation server.', array('!languages' => \Drupal::url('language.admin_overview'), '!translation-updates' => \Drupal::url('locale.translate_status'), '!server' => 'https://localize.drupal.org')) . '
'; + $output .= '
' . t('You can check how much of the interface on your site is translated into which language on the Languages page. On the Available translation updates page, you can check whether interface translation updates are available on the Drupal translation server.', array('!languages' => \Drupal::url('entity.configurable_language.collection'), '!translation-updates' => \Drupal::url('locale.translate_status'), '!server' => 'https://localize.drupal.org')) . '
'; $output .= '
' . t('Translating individual strings') . '
'; $output .= '
' . t('You can translate individual strings directly on the User interface translation page, or download the currently-used translation file for a specific language on the Export page. Once you have edited the translation file, you can then import it again on the Import page.', array('!translate' => \Drupal::url('locale.translate_page'), '!export' => \Drupal::url('locale.translate_export'), '!import' => \Drupal::url('locale.translate_import'))) . '
'; $output .= '
'; return $output; - case 'language.admin_overview': + case 'entity.configurable_language.collection': return '

' . 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('Uses') . '

'; $output .= '
'; $output .= '
' . t('Managing menus') . '
'; - $output .= '
' . t('Users with the Administer menus and menu items permission can add, edit, and delete custom menus on the Menus page. Custom menus can be special site menus, menus of external links, or any combination of internal and external links. You may create an unlimited number of additional menus, each of which will automatically have an associated block (if you have the Block module installed). By selecting Edit menu, you can add, edit, or delete links for a given menu. The links listing page provides a drag-and-drop interface for controlling the order of links, and creating a hierarchy within the menu.', array('!block_help' => \Drupal::url('help.page', array('name' => 'block')), '!menu' => \Drupal::url('menu_ui.overview_page'))) . '
'; + $output .= '
' . t('Users with the Administer menus and menu items permission can add, edit, and delete custom menus on the Menus page. Custom menus can be special site menus, menus of external links, or any combination of internal and external links. You may create an unlimited number of additional menus, each of which will automatically have an associated block (if you have the Block module installed). By selecting Edit menu, you can add, edit, or delete links for a given menu. The links listing page provides a drag-and-drop interface for controlling the order of links, and creating a hierarchy within the menu.', array('!block_help' => \Drupal::url('help.page', array('name' => 'block')), '!menu' => \Drupal::url('entity.menu.collection'))) . '
'; $output .= '
' . t('Displaying menus') . '
'; $output .= '
' . t('If you have the Block module enabled, then each menu that you create is rendered in a block that you enable and position on the Block layout page. In some themes, the main menu and possibly the secondary menu will be output automatically; you may be able to disable this behavior on the theme\'s settings page.', array('!blocks' => (\Drupal::moduleHandler()->moduleExists('block')) ? \Drupal::url('block.admin_display') : '#', '!themes' => \Drupal::url('system.themes_page'), '!theme_settings' => \Drupal::url('system.theme_settings'))) . '
'; $output .= '
'; @@ -48,7 +48,7 @@ function menu_ui_help($route_name, RouteMatchInterface $route_match) { if ($route_name == 'entity.menu.add_form' && \Drupal::moduleHandler()->moduleExists('block')) { return '

' . 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('Uses') . '

'; $output .= '
'; $output .= '
' . t('Creating content') . '
'; - $output .= '
' . t('When new content is created, the Node module records basic information about the content, including the author, date of creation, and the Content type. It also manages the publishing options, which define whether or not the content is published, promoted to the front page of the site, and/or sticky at the top of content lists. Default settings can be configured for each type of content on your site.', array('!content-type' => \Drupal::url('node.overview_types'))) . '
'; + $output .= '
' . t('When new content is created, the Node module records basic information about the content, including the author, date of creation, and the Content type. It also manages the publishing options, which define whether or not the content is published, promoted to the front page of the site, and/or sticky at the top of content lists. Default settings can be configured for each type of content on your site.', array('!content-type' => \Drupal::url('entity.node_type.collection'))) . '
'; $output .= '
' . t('Creating custom content types') . '
'; $output .= '
' . t('The Node module gives users with the Administer content types permission the ability to create new content types in addition to the default ones already configured. Creating custom content types allows you the flexibility to add fields and configure default settings that suit the differing needs of various site content.', array('!content-new' => \Drupal::url('node.type_add'), '!field' => \Drupal::url('help.page', array('name' => 'field')))) . '
'; $output .= '
' . t('Administering content') . '
'; diff --git a/core/modules/node/node.routing.yml b/core/modules/node/node.routing.yml index 2eff2f0e5fdcc0deca04128873418b4657950d20..0b90a33f06a61660a456cf6cc4e9b898b064bd19 100644 --- a/core/modules/node/node.routing.yml +++ b/core/modules/node/node.routing.yml @@ -80,7 +80,7 @@ node.revision_delete_confirm: options: _node_operation_route: TRUE -node.overview_types: +entity.node_type.collection: path: '/admin/structure/types' defaults: _controller: '\Drupal\Core\Entity\Controller\EntityListController::listing' diff --git a/core/modules/node/src/Entity/NodeType.php b/core/modules/node/src/Entity/NodeType.php index 8f55f795b5117de4b47d1e0aefdc6ed206cdf306..8a08d2670aae6dac1f889856866495689787e902 100644 --- a/core/modules/node/src/Entity/NodeType.php +++ b/core/modules/node/src/Entity/NodeType.php @@ -36,7 +36,8 @@ * }, * links = { * "edit-form" = "/admin/structure/types/manage/{node_type}", - * "delete-form" = "/admin/structure/types/manage/{node_type}/delete" + * "delete-form" = "/admin/structure/types/manage/{node_type}/delete", + * "collection" = "/admin/structure/types", * } * ) */ diff --git a/core/modules/node/src/Form/NodeTypeDeleteConfirm.php b/core/modules/node/src/Form/NodeTypeDeleteConfirm.php index 2d662c1e7a773669422613971730211eba1bf29d..31c44610a5a900d5d3e80cde4f65fdc399ed0bf9 100644 --- a/core/modules/node/src/Form/NodeTypeDeleteConfirm.php +++ b/core/modules/node/src/Form/NodeTypeDeleteConfirm.php @@ -10,7 +10,6 @@ use Drupal\Core\Entity\EntityConfirmFormBase; use Drupal\Core\Entity\Query\QueryFactory; use Drupal\Core\Form\FormStateInterface; -use Drupal\Core\Url; use Symfony\Component\DependencyInjection\ContainerInterface; /** @@ -55,7 +54,7 @@ public function getQuestion() { * {@inheritdoc} */ public function getCancelUrl() { - return new Url('node.overview_types'); + return $this->entity->urlInfo('collection'); } /** diff --git a/core/modules/node/src/NodeTypeForm.php b/core/modules/node/src/NodeTypeForm.php index cbfe841e609d0887a0c6fd5e65fca3d5ba2b319b..2292cf0fa568c53964ee4fec1471d9915fdb677d 100644 --- a/core/modules/node/src/NodeTypeForm.php +++ b/core/modules/node/src/NodeTypeForm.php @@ -233,7 +233,7 @@ public function save(array $form, FormStateInterface $form_state) { elseif ($status == SAVED_NEW) { node_add_body_field($type); drupal_set_message(t('The content type %name has been added.', $t_args)); - $context = array_merge($t_args, array('link' => $this->l(t('View'), new Url('node.overview_types')))); + $context = array_merge($t_args, array('link' => $type->link($this->t('View'), 'collection'))); $this->logger('node')->notice('Added content type %name.', $context); } @@ -256,7 +256,7 @@ public function save(array $form, FormStateInterface $form_state) { } $this->entityManager->clearCachedFieldDefinitions(); - $form_state->setRedirect('node.overview_types'); + $form_state->setRedirectUrl($type->urlInfo('collection')); } } diff --git a/core/modules/responsive_image/responsive_image.info.yml b/core/modules/responsive_image/responsive_image.info.yml index 1991dc3361d050fa7054b7bea4785f6a407dee5b..dec6feeec444c3a2afe56170ef08fba12fd41209 100644 --- a/core/modules/responsive_image/responsive_image.info.yml +++ b/core/modules/responsive_image/responsive_image.info.yml @@ -7,4 +7,4 @@ core: 8.x dependencies: - breakpoint - image -configure: responsive_image.mapping_page +configure: entity.responsive_image_mapping.collection diff --git a/core/modules/responsive_image/responsive_image.links.action.yml b/core/modules/responsive_image/responsive_image.links.action.yml index 302437e006dbdcba9a1840006b12f7c0fc373d1e..6308cd1c3e9fe6e07c682fef036406b1e1ce2110 100644 --- a/core/modules/responsive_image/responsive_image.links.action.yml +++ b/core/modules/responsive_image/responsive_image.links.action.yml @@ -2,4 +2,4 @@ responsive_image.mapping_page_add: route_name: responsive_image.mapping_page_add title: 'Add responsive image mapping' appears_on: - - responsive_image.mapping_page + - entity.responsive_image_mapping.collection diff --git a/core/modules/responsive_image/responsive_image.links.menu.yml b/core/modules/responsive_image/responsive_image.links.menu.yml index 796e1f5c472b09506a732566909c92c293e74e07..c72d4ee23703b809f1ce7a3e5bc8a3485130d315 100644 --- a/core/modules/responsive_image/responsive_image.links.menu.yml +++ b/core/modules/responsive_image/responsive_image.links.menu.yml @@ -1,6 +1,6 @@ -responsive_image.mapping_page: +entity.responsive_image_mapping.collection: title: 'Responsive image mappings' description: 'Manage responsive image mappings' weight: 10 - route_name: responsive_image.mapping_page + route_name: entity.responsive_image_mapping.collection parent: system.admin_config_media diff --git a/core/modules/responsive_image/responsive_image.module b/core/modules/responsive_image/responsive_image.module index b02e523b8c8906805e3b2afad2ca37d29bfaef44..a8200684c178a867603a7ecb276cace15e5b73ff 100644 --- a/core/modules/responsive_image/responsive_image.module +++ b/core/modules/responsive_image/responsive_image.module @@ -29,13 +29,13 @@ function responsive_image_help($route_name, RouteMatchInterface $route_match) { $output .= '

' . t('Uses') . '

'; $output .= '
'; $output .= '
' . t('Defining responsive image mappings') . '
'; - $output .= '
' . t('By creating responsive image mappings you define the image styles that are being used to output images at certain breakpoints. On the Responsive image mappings page, click Add responsive image mapping to create a new mapping. First chose a label and a breakpoint group and click Save. After that you can choose the image styles that will be used for each breakpoint. Image styles can be defined on the Image styles page that is provided by the Image module. Breakpoints are defined in the configuration files of the theme. See the help page of the Breakpoint module for more information.', array('!responsive_image_mapping' => \Drupal::url('responsive_image.mapping_page'), '!image_styles' => \Drupal::url('image.style_list'),'!image_help' => \Drupal::url('help.page', array('name' => 'image')), '!breakpoint_help' => \Drupal::url('help.page', array('name' => 'breakpoint')))) . '
'; + $output .= '
' . t('By creating responsive image mappings you define the image styles that are being used to output images at certain breakpoints. On the Responsive image mappings page, click Add responsive image mapping to create a new mapping. First chose a label and a breakpoint group and click Save. After that you can choose the image styles that will be used for each breakpoint. Image styles can be defined on the Image styles page that is provided by the Image module. Breakpoints are defined in the configuration files of the theme. See the help page of the Breakpoint module for more information.', array('!responsive_image_mapping' => \Drupal::url('entity.responsive_image_mapping.collection'), '!image_styles' => \Drupal::url('entity.image_style.collection'),'!image_help' => \Drupal::url('help.page', array('name' => 'image')), '!breakpoint_help' => \Drupal::url('help.page', array('name' => 'breakpoint')))) . '
'; $output .= '
' . t('Using responsive image mappings in Image fields') . '
'; $output .= '
' . t('After defining responsive image mappings, you can use them in the display settings for your Image fields, so that the site displays responsive images using the HTML5 picture tag. Open the Manage display page for the entity type (content type, taxonomy vocabulary, etc.) that the Image field is attached to. Choose the format Responsive image, click the Edit icon, and select one of the responsive image mappings that you have created. For general information on how to manage fields and their display see the Field UI module help page. For background information about entities and fields see the Field module help page.', array('!field_ui' => \Drupal::url('help.page', array('name' => 'field_ui')),'!field_help' => \Drupal::url('help.page', array('name' => 'field')))) . '
'; $output .= '
'; break; - case 'responsive_image.mapping_page': + case 'entity.responsive_image_mapping.collection': $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('Uses') . '

'; $output .= '
'; $output .= '
' . t('Configuring search pages') . '
'; - $output .= '
' . t('To configure search pages, visit the Search pages page. In the Search pages section, you can add a new search page, edit the configuration of existing search pages, enable and disable search pages, and choose the default search page. Each enabled search page has a URL path starting with search, and each will appear as a tab or local task link on the search page; you can configure the text that is shown in the tab. In addition, some search page plugins have additional settings that you can configure for each search page.', array('!search-settings' => \Drupal::url('search.settings'), '!search-url' => \Drupal::url('search.view'))) . '
'; + $output .= '
' . t('To configure search pages, visit the Search pages page. In the Search pages section, you can add a new search page, edit the configuration of existing search pages, enable and disable search pages, and choose the default search page. Each enabled search page has a URL path starting with search, and each will appear as a tab or local task link on the search page; you can configure the text that is shown in the tab. In addition, some search page plugins have additional settings that you can configure for each search page.', array('!search-settings' => \Drupal::url('entity.search_page.collection'), '!search-url' => \Drupal::url('search.view'))) . '
'; $output .= '
' . t('Managing the search index') . '
'; - $output .= '
' . t('Some search page plugins, such as the core Content search page, index searchable text using the Drupal core search index, and will not work unless content is indexed. Indexing is done during cron runs, so it requires a cron maintenance task to be set up. There are also several settings affecting indexing that can be configured on the Search pages page: the number of items to index per cron run, the minimum word length to index, and how to handle Chinese, Japanese, and Korean characters.', array('!cron' => \Drupal::url('system.cron_settings'), '!search-settings' => \Drupal::url('search.settings'))) . '
'; - $output .= '
' . t('Modules providing search page plugins generally ensure that content-related actions on your site (creating, editing, or deleting content and comments) automatically cause affected content items to be marked for indexing or reindexing at the next cron run. When content is marked for reindexing, the previous content remains in the index until cron runs, at which time it is replaced by the new content. However, there are some actions related to the structure of your site that do not cause affected content to be marked for reindexing. Examples of structure-related actions that affect content include deleting or editing taxonomy terms, enabling or disabling modules that add text to content (such as Taxonomy, Comment, and field-providing modules), and modifying the fields or display parameters of your content types. If you take one of these actions and you want to ensure that the search index is updated to reflect your changed site structure, you can mark all content for reindexing by clicking the "Re-index site" button on the Search pages page. If you have a lot of content on your site, it may take several cron runs for the content to be reindexed.', array('!search-settings' => \Drupal::url('search.settings'))) . '
'; + $output .= '
' . t('Some search page plugins, such as the core Content search page, index searchable text using the Drupal core search index, and will not work unless content is indexed. Indexing is done during cron runs, so it requires a cron maintenance task to be set up. There are also several settings affecting indexing that can be configured on the Search pages page: the number of items to index per cron run, the minimum word length to index, and how to handle Chinese, Japanese, and Korean characters.', array('!cron' => \Drupal::url('system.cron_settings'), '!search-settings' => \Drupal::url('entity.search_page.collection'))) . '
'; + $output .= '
' . t('Modules providing search page plugins generally ensure that content-related actions on your site (creating, editing, or deleting content and comments) automatically cause affected content items to be marked for indexing or reindexing at the next cron run. When content is marked for reindexing, the previous content remains in the index until cron runs, at which time it is replaced by the new content. However, there are some actions related to the structure of your site that do not cause affected content to be marked for reindexing. Examples of structure-related actions that affect content include deleting or editing taxonomy terms, enabling or disabling modules that add text to content (such as Taxonomy, Comment, and field-providing modules), and modifying the fields or display parameters of your content types. If you take one of these actions and you want to ensure that the search index is updated to reflect your changed site structure, you can mark all content for reindexing by clicking the "Re-index site" button on the Search pages page. If you have a lot of content on your site, it may take several cron runs for the content to be reindexed.', array('!search-settings' => \Drupal::url('entity.search_page.collection'))) . '
'; $output .= '
' . t('Displaying the Search block') . '
'; $output .= '
' . t('The Search module includes a block, which can be enabled and configured on the Block layout page, if you have the Block module enabled; the default block title is Search, and it is the Search form block in the Forms category, if you wish to add another instance. The block is available to users with the Use search permission, and it performs a search using the configured default search page.', array('!blocks' => (\Drupal::moduleHandler()->moduleExists('block')) ? \Drupal::url('block.admin_display') : '#', '!search_permission' => \Drupal::url('user.admin_permissions', array(), array('fragment' => 'module-search')))) . '
'; $output .= '
' . t('Searching your site') . '
'; @@ -91,7 +91,7 @@ function search_help($route_name, RouteMatchInterface $route_match) { $output .= '
'; return $output; - case 'search.settings': + case 'entity.search_page.collection': return '

' . 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('Uses') . '

'; $output .= '
' . t('Administering shortcuts') . '
'; - $output .= '
' . t('Users with the Administer shortcuts permission can manage shortcut sets and edit the shortcuts within sets from the Shortcuts administration page.', array('!shortcuts' => \Drupal::url('shortcut.set_admin'))) . '
'; + $output .= '
' . t('Users with the Administer shortcuts permission can manage shortcut sets and edit the shortcuts within sets from the Shortcuts administration page.', array('!shortcuts' => \Drupal::url('entity.shortcut_set.collection'))) . '
'; $output .= '
' . t('Choosing shortcut sets') . '
'; $output .= '
' . t('Users with permission to switch shortcut sets can choose a shortcut set to use from the Shortcuts tab of their user account page.') . '
'; $output .= '
' . t('Adding and removing shortcuts') . '
'; @@ -34,7 +34,7 @@ function shortcut_help($route_name, RouteMatchInterface $route_match) { $output .= '
'; return $output; - case 'shortcut.set_admin': + case 'entity.shortcut_set.collection': case 'shortcut.set_add': case 'entity.shortcut_set.edit_form': $user = \Drupal::currentUser(); @@ -373,7 +373,7 @@ function shortcut_toolbar() { 'tab' => array( '#type' => 'link', '#title' => t('Shortcuts'), - '#url' => Url::fromRoute('shortcut.set_admin'), + '#url' => $shortcut_set->urlInfo('collection'), '#attributes' => array( 'title' => t('Shortcuts'), 'class' => array('toolbar-icon', 'toolbar-icon-shortcut'), diff --git a/core/modules/shortcut/shortcut.routing.yml b/core/modules/shortcut/shortcut.routing.yml index 7fb1c0962c1f828ee091f8a20ebd6d72c3bcf1e0..d6c0e1ad2bccb3a567a11e7575223f319711371a 100644 --- a/core/modules/shortcut/shortcut.routing.yml +++ b/core/modules/shortcut/shortcut.routing.yml @@ -6,7 +6,7 @@ entity.shortcut_set.delete_form: requirements: _entity_access: 'shortcut_set.delete' -shortcut.set_admin: +entity.shortcut_set.collection: path: '/admin/config/user-interface/shortcut' defaults: _entity_list: 'shortcut_set' diff --git a/core/modules/shortcut/src/Entity/ShortcutSet.php b/core/modules/shortcut/src/Entity/ShortcutSet.php index 2b862c5cf5e2355b98971871f956203c67a9efdb..aa0ccfc8a4c10b7a6ca1fadfab1264fe6bf51fca 100644 --- a/core/modules/shortcut/src/Entity/ShortcutSet.php +++ b/core/modules/shortcut/src/Entity/ShortcutSet.php @@ -38,7 +38,8 @@ * links = { * "customize-form" = "/admin/config/user-interface/shortcut/manage/{shortcut_set}/customize", * "delete-form" = "/admin/config/user-interface/shortcut/manage/{shortcut_set}/delete", - * "edit-form" = "/admin/config/user-interface/shortcut/manage/{shortcut_set}" + * "edit-form" = "/admin/config/user-interface/shortcut/manage/{shortcut_set}", + * "collection" = "/admin/config/user-interface/shortcut", * } * ) */ diff --git a/core/modules/shortcut/src/Form/ShortcutSetDeleteForm.php b/core/modules/shortcut/src/Form/ShortcutSetDeleteForm.php index 036005304db90647257ed0a4d8bffe9465cc9b49..c38d191a6b42849e1bb074d213d582d4583c4c55 100644 --- a/core/modules/shortcut/src/Form/ShortcutSetDeleteForm.php +++ b/core/modules/shortcut/src/Form/ShortcutSetDeleteForm.php @@ -103,7 +103,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { */ public function submitForm(array &$form, FormStateInterface $form_state) { $this->entity->delete(); - $form_state->setRedirect('shortcut.set_admin'); + $form_state->setRedirectUrl($this->entity->urlInfo('collection')); drupal_set_message(t('The shortcut set %title has been deleted.', array('%title' => $this->entity->label()))); } diff --git a/core/modules/system/src/Form/DateFormatDeleteForm.php b/core/modules/system/src/Form/DateFormatDeleteForm.php index 0cb8729452483217b5720cdac8760abd12c3c309..b71eb494a5b94221c7c729f2cd90c8522d0f3967 100644 --- a/core/modules/system/src/Form/DateFormatDeleteForm.php +++ b/core/modules/system/src/Form/DateFormatDeleteForm.php @@ -10,7 +10,6 @@ use Drupal\Core\Datetime\DateFormatter; use Drupal\Core\Entity\EntityConfirmFormBase; use Drupal\Core\Form\FormStateInterface; -use Drupal\Core\Url; use Symfony\Component\DependencyInjection\ContainerInterface; /** @@ -65,7 +64,7 @@ public function getConfirmText() { * {@inheritdoc} */ public function getCancelUrl() { - return new Url('system.date_format_list'); + return $this->entity->urlInfo('collection'); } /** diff --git a/core/modules/system/src/Form/DateFormatFormBase.php b/core/modules/system/src/Form/DateFormatFormBase.php index cb2fde2ca49936dffe1d28bc07c177c723f8a939..c843ba24210e8adfbbba6de2e116217fd6cde773 100644 --- a/core/modules/system/src/Form/DateFormatFormBase.php +++ b/core/modules/system/src/Form/DateFormatFormBase.php @@ -174,7 +174,6 @@ public function validate(array $form, FormStateInterface $form_state) { * {@inheritdoc} */ public function submitForm(array &$form, FormStateInterface $form_state) { - $form_state->setRedirect('system.date_format_list'); $form_state->setValue('pattern', trim($form_state->getValue('date_format_pattern'))); parent::submitForm($form, $form_state); } @@ -190,6 +189,7 @@ public function save(array $form, FormStateInterface $form_state) { else { drupal_set_message(t('Custom date format added.')); } + $form_state->setRedirectUrl($this->entity->urlInfo('collection')); } } diff --git a/core/modules/system/src/Tests/System/DateTimeTest.php b/core/modules/system/src/Tests/System/DateTimeTest.php index fa87fc9187286df4127923b10367a1a6148b62f3..f01f8c069e9f1ac82915b49a43385c7e5568bab7 100644 --- a/core/modules/system/src/Tests/System/DateTimeTest.php +++ b/core/modules/system/src/Tests/System/DateTimeTest.php @@ -87,7 +87,7 @@ function testDateFormatConfiguration() { 'date_format_pattern' => $date_format, ); $this->drupalPostForm('admin/config/regional/date-time/formats/add', $edit, t('Add format')); - $this->assertUrl(\Drupal::url('system.date_format_list', [], ['absolute' => TRUE]), [], 'Correct page redirection.'); + $this->assertUrl(\Drupal::url('entity.date_format.collection', [], ['absolute' => TRUE]), [], 'Correct page redirection.'); $this->assertText(t('Custom date format added.'), 'Date format added confirmation message appears.'); $this->assertText($date_format_id, 'Custom date format appears in the date format list.'); $this->assertText(t('Delete'), 'Delete link for custom date format appears.'); @@ -106,13 +106,13 @@ function testDateFormatConfiguration() { 'date_format_pattern' => 'Y m', ); $this->drupalPostForm($this->getUrl(), $edit, t('Save format')); - $this->assertUrl(\Drupal::url('system.date_format_list', [], ['absolute' => TRUE]), [], 'Correct page redirection.'); + $this->assertUrl(\Drupal::url('entity.date_format.collection', [], ['absolute' => TRUE]), [], 'Correct page redirection.'); $this->assertText(t('Custom date format updated.'), 'Custom date format successfully updated.'); // Delete custom date format. $this->clickLink(t('Delete')); $this->drupalPostForm('admin/config/regional/date-time/formats/manage/' . $date_format_id . '/delete', array(), t('Remove')); - $this->assertUrl(\Drupal::url('system.date_format_list', [], ['absolute' => TRUE]), [], 'Correct page redirection.'); + $this->assertUrl(\Drupal::url('entity.date_format.collection', [], ['absolute' => TRUE]), [], 'Correct page redirection.'); $this->assertRaw(t('Removed date format %format.', array('%format' => $name)), 'Custom date format removed.'); // Make sure the date does not exist in config. diff --git a/core/modules/system/system.links.action.yml b/core/modules/system/system.links.action.yml index c08a2cfc781bbb5cfa0695f0d35780295e162894..447a5e6393f00977becf0f5bb60684f405a1d1ea 100644 --- a/core/modules/system/system.links.action.yml +++ b/core/modules/system/system.links.action.yml @@ -3,4 +3,4 @@ system.date_format_add: title: 'Add format' weight: -10 appears_on: - - system.date_format_list + - entity.date_format.collection diff --git a/core/modules/system/system.links.menu.yml b/core/modules/system/system.links.menu.yml index 9563f83626ef28a4e0c0e7fb635674bbe9d018ad..ba21cee14e405e40196c0d99f16ab921685c5392 100644 --- a/core/modules/system/system.links.menu.yml +++ b/core/modules/system/system.links.menu.yml @@ -94,11 +94,11 @@ system.regional_settings: description: 'Settings for the site''s default time zone and country.' route_name: system.regional_settings weight: -20 -system.date_format_list: +entity.date_format.collection: title: 'Date and time formats' parent: system.admin_config_regional description: 'Configure display format strings for date and time.' - route_name: system.date_format_list + route_name: entity.date_format.collection weight: -9 system.admin_config_search: title: 'Search and metadata' diff --git a/core/modules/system/system.links.task.yml b/core/modules/system/system.links.task.yml index 3d5564735fff2641a94f7d15d56334e20863ec04..a151835a40e985c99d541ffa6f5e54e8fa639fb8 100644 --- a/core/modules/system/system.links.task.yml +++ b/core/modules/system/system.links.task.yml @@ -55,9 +55,9 @@ system.admin_index: title: 'Index' weight: -18 -system.date_format_list: - route_name: system.date_format_list - base_route: system.date_format_list +entity.date_format.collection: + route_name: entity.date_format.collection + base_route: entity.date_format.collection title: 'List' entity.date_format.edit_form: title: 'Edit' diff --git a/core/modules/system/system.module b/core/modules/system/system.module index 7c6771471ca57e0e09e445404163f88eb14efb9c..458815422b6038705713c4936874a4a3105a3579 100644 --- a/core/modules/system/system.module +++ b/core/modules/system/system.module @@ -86,7 +86,7 @@ function system_help($route_name, RouteMatchInterface $route_match) { $output .= '
' . t('Performing system maintenance') . '
'; $output .= '
' . t('In order for the site and its modules to continue to operate well, a set of routine administrative operations must run on a regular basis. The System module manages this task by making use of a system cron job. You can verify the status of cron tasks by visiting the Status report page. For more information, see the online handbook entry for configuring cron jobs. You can set up cron job by visiting Cron configuration page', array('@status' => \Drupal::url('system.status'), '@handbook' => 'http://drupal.org/cron', '@cron' => \Drupal::url('system.cron_settings'))) . '
'; $output .= '
' . t('Configuring basic site settings') . '
'; - $output .= '
' . t('The System module also handles basic configuration options for your site, including Date and time settings, File system settings, Site name and other information, and a Maintenance mode for taking your site temporarily offline.', array('@date-time-settings' => \Drupal::url('system.date_format_list'), '@file-system' => \Drupal::url('system.file_system_settings'), '@site-info' => \Drupal::url('system.site_information_settings'), '@maintenance-mode' => \Drupal::url('system.site_maintenance_mode'))) . '
'; + $output .= '
' . t('The System module also handles basic configuration options for your site, including Date and time settings, File system settings, Site name and other information, and a Maintenance mode for taking your site temporarily offline.', array('@date-time-settings' => \Drupal::url('entity.date_format.collection'), '@file-system' => \Drupal::url('system.file_system_settings'), '@site-info' => \Drupal::url('system.site_information_settings'), '@maintenance-mode' => \Drupal::url('system.site_maintenance_mode'))) . '
'; $output .= '
' . t('Disabling drag-and-drop functionality') . '
'; $output .= '
' . t('The default drag-and-drop user interface for ordering tables in Drupal presents a challenge for some users, including users of screen readers and other assistive technology. The drag-and-drop interface can be disabled in a table by clicking a link labeled "Show row weights" above the table. The replacement interface allows users to order the table by choosing numerical weights instead of dragging table rows.') . '
'; $output .= '
'; @@ -1309,7 +1309,8 @@ function system_entity_type_build(array &$entity_types) { ->setFormClass('delete', 'Drupal\system\Form\DateFormatDeleteForm') ->setListBuilderClass('Drupal\system\DateFormatListBuilder') ->setLinkTemplate('edit-form', '/admin/config/regional/date-time/formats/manage/{date_format}') - ->setLinkTemplate('delete-form', '/admin/config/regional/date-time/formats/manage/{date_format}/delete'); + ->setLinkTemplate('delete-form', '/admin/config/regional/date-time/formats/manage/{date_format}/delete') + ->setLinkTemplate('collection', '/admin/config/regional/date-time/formats'); } /** diff --git a/core/modules/system/system.routing.yml b/core/modules/system/system.routing.yml index 77489f5c4fb900932f13979c1764188866408360..798cc899de3baf7c5fca507d84017842dac8d1a5 100644 --- a/core/modules/system/system.routing.yml +++ b/core/modules/system/system.routing.yml @@ -220,7 +220,7 @@ system.run_cron: requirements: _permission: 'administer site configuration' -system.date_format_list: +entity.date_format.collection: path: '/admin/config/regional/date-time' defaults: _entity_list: 'date_format' diff --git a/core/modules/system/tests/modules/entity_test/entity_test.routing.yml b/core/modules/system/tests/modules/entity_test/entity_test.routing.yml index 7b4ccbc15f92fa6479b1db3794d72430879c12ad..78551c68fa33177fb18a78a242bd6877ca526086 100644 --- a/core/modules/system/tests/modules/entity_test/entity_test.routing.yml +++ b/core/modules/system/tests/modules/entity_test/entity_test.routing.yml @@ -24,7 +24,7 @@ entity.entity_test.render_no_view_mode: requirements: _access: 'TRUE' -entity.entity_test.list_referencing_entities: +entity.entity_test.collection_referencing_entities: path: '/entity_test/list/{entity_reference_field_name}/{referenced_entity_type}/{referenced_entity_id}' defaults: _controller: '\Drupal\entity_test\Controller\EntityTestController::listReferencingEntities' @@ -32,7 +32,7 @@ entity.entity_test.list_referencing_entities: requirements: _access: 'TRUE' -entity.entity_test.list_labels_alphabetically: +entity.entity_test.collection_labels_alphabetically: path: '/entity_test/list_labels_alphabetically/{entity_type_id}' defaults: _controller: '\Drupal\entity_test\Controller\EntityTestController::listEntitiesAlphabetically' @@ -40,7 +40,7 @@ entity.entity_test.list_labels_alphabetically: requirements: _access: 'TRUE' -entity.entity_test.list_empty: +entity.entity_test.collection_empty: path: '/entity_test/list_empty/{entity_type_id}' defaults: _controller: '\Drupal\entity_test\Controller\EntityTestController::listEntitiesEmpty' diff --git a/core/modules/taxonomy/src/Entity/Vocabulary.php b/core/modules/taxonomy/src/Entity/Vocabulary.php index ef831de2ec6f9f952858c58b773f143efcc47919..4f21f8a781fda39ba6ca2c768fe69f106ce47b3c 100644 --- a/core/modules/taxonomy/src/Entity/Vocabulary.php +++ b/core/modules/taxonomy/src/Entity/Vocabulary.php @@ -40,7 +40,8 @@ * "delete-form" = "/admin/structure/taxonomy/manage/{taxonomy_vocabulary}/delete", * "reset-form" = "/admin/structure/taxonomy/manage/{taxonomy_vocabulary}/reset", * "overview-form" = "/admin/structure/taxonomy/manage/{taxonomy_vocabulary}/overview", - * "edit-form" = "/admin/structure/taxonomy/manage/{taxonomy_vocabulary}" + * "edit-form" = "/admin/structure/taxonomy/manage/{taxonomy_vocabulary}", + * "collection" = "/admin/structure/taxonomy", * } * ) */ diff --git a/core/modules/taxonomy/src/Form/TermDeleteForm.php b/core/modules/taxonomy/src/Form/TermDeleteForm.php index 77a3644c9683052b3950b5f92f349669b4596e31..eaccb2bb34bfc581336ce34c88c46a72ef4e7fe1 100644 --- a/core/modules/taxonomy/src/Form/TermDeleteForm.php +++ b/core/modules/taxonomy/src/Form/TermDeleteForm.php @@ -8,9 +8,6 @@ namespace Drupal\taxonomy\Form; use Drupal\Core\Form\FormStateInterface; -use Drupal\Core\Url; -use Symfony\Component\DependencyInjection\ContainerInterface; -use Drupal\Core\Entity\EntityManagerInterface; use Drupal\Core\Entity\ContentEntityConfirmFormBase; /** @@ -36,7 +33,7 @@ public function getQuestion() { * {@inheritdoc} */ public function getCancelUrl() { - return new Url('taxonomy.vocabulary_list'); + return $this->entity->urlInfo('collection'); } /** diff --git a/core/modules/taxonomy/src/Form/VocabularyDeleteForm.php b/core/modules/taxonomy/src/Form/VocabularyDeleteForm.php index 16ae28545e0f47dfd717b939b66c98eef812f79b..3f937b80a54c1a19f2121278720828843df5949a 100644 --- a/core/modules/taxonomy/src/Form/VocabularyDeleteForm.php +++ b/core/modules/taxonomy/src/Form/VocabularyDeleteForm.php @@ -9,7 +9,6 @@ use Drupal\Core\Entity\EntityConfirmFormBase; use Drupal\Core\Form\FormStateInterface; -use Drupal\Core\Url; /** * Provides a deletion confirmation form for taxonomy vocabulary. @@ -34,7 +33,7 @@ public function getQuestion() { * {@inheritdoc} */ public function getCancelUrl() { - return new Url('taxonomy.vocabulary_list'); + return $this->entity->urlInfo('collection'); } /** diff --git a/core/modules/taxonomy/src/VocabularyForm.php b/core/modules/taxonomy/src/VocabularyForm.php index fa726259287f321a0071f4859c923a515a5e0f72..ffedfdad92d067ce9285f0158026b75b31bd679a 100644 --- a/core/modules/taxonomy/src/VocabularyForm.php +++ b/core/modules/taxonomy/src/VocabularyForm.php @@ -156,7 +156,7 @@ public function save(array $form, FormStateInterface $form_state) { case SAVED_UPDATED: drupal_set_message($this->t('Updated vocabulary %name.', array('%name' => $vocabulary->label()))); $this->logger('taxonomy')->notice('Updated vocabulary %name.', array('%name' => $vocabulary->label(), 'link' => $edit_link)); - $form_state->setRedirect('taxonomy.vocabulary_list'); + $form_state->setRedirectUrl($vocabulary->urlInfo('collection')); break; } diff --git a/core/modules/taxonomy/taxonomy.info.yml b/core/modules/taxonomy/taxonomy.info.yml index 3add22e2637871ffbdf5a26d9208f5a44807972a..ceca3dd91c50089757f8a5b6f0dca71f4a4e33ea 100644 --- a/core/modules/taxonomy/taxonomy.info.yml +++ b/core/modules/taxonomy/taxonomy.info.yml @@ -7,4 +7,4 @@ core: 8.x dependencies: - node - text -configure: taxonomy.vocabulary_list +configure: entity.taxonomy_vocabulary.collection diff --git a/core/modules/taxonomy/taxonomy.links.action.yml b/core/modules/taxonomy/taxonomy.links.action.yml index 102e9b716492fb67bc0101ad7ecb841ea5c06d28..498c6c4e9fea4e193ece5446d5a40a8095c2ec93 100644 --- a/core/modules/taxonomy/taxonomy.links.action.yml +++ b/core/modules/taxonomy/taxonomy.links.action.yml @@ -2,7 +2,7 @@ entity.taxonomy_vocabulary.add_form: route_name: entity.taxonomy_vocabulary.add_form title: 'Add vocabulary' appears_on: - - taxonomy.vocabulary_list + - entity.taxonomy_vocabulary.collection entity.taxonomy_term.add_form: route_name: entity.taxonomy_term.add_form diff --git a/core/modules/taxonomy/taxonomy.links.menu.yml b/core/modules/taxonomy/taxonomy.links.menu.yml index 77bb6faa2ae7fda1d29b681fe743487503118a93..7626a2cc4ed85e2257207cff0715a4a281b1704b 100644 --- a/core/modules/taxonomy/taxonomy.links.menu.yml +++ b/core/modules/taxonomy/taxonomy.links.menu.yml @@ -1,5 +1,5 @@ -taxonomy.vocabulary_list: +entity.taxonomy_vocabulary.collection: title: Taxonomy parent: system.admin_structure description: 'Manage tagging, categorization, and classification of your content.' - route_name: taxonomy.vocabulary_list + route_name: entity.taxonomy_vocabulary.collection diff --git a/core/modules/taxonomy/taxonomy.module b/core/modules/taxonomy/taxonomy.module index 95f6a6bcc3923d3221ccbc6d4e91b7569a2bbe88..7eeeb992c63ef12571fd04aa877cf2b0d29b6dd7 100644 --- a/core/modules/taxonomy/taxonomy.module +++ b/core/modules/taxonomy/taxonomy.module @@ -56,7 +56,7 @@ function taxonomy_help($route_name, RouteMatchInterface $route_match) { $output .= '

' . t('Uses') . '

'; $output .= '
'; $output .= '
' . t('Creating vocabularies') . '
'; - $output .= '
' . t('Users with sufficient permissions can create vocabularies and terms through the Taxonomy page. The page listing the terms provides a drag-and-drop interface for controlling the order of the terms and sub-terms within a vocabulary, in a hierarchical fashion. A controlled vocabulary classifying music by genre with terms and sub-terms could look as follows:', array('@taxo' => \Drupal::url('taxonomy.vocabulary_list'), '@perm' => \Drupal::url('user.admin_permissions', [], array('fragment'=>'module-taxonomy')))); + $output .= '
' . t('Users with sufficient permissions can create vocabularies and terms through the Taxonomy page. The page listing the terms provides a drag-and-drop interface for controlling the order of the terms and sub-terms within a vocabulary, in a hierarchical fashion. A controlled vocabulary classifying music by genre with terms and sub-terms could look as follows:', array('@taxo' => \Drupal::url('entity.taxonomy_vocabulary.collection'), '@perm' => \Drupal::url('user.admin_permissions', [], array('fragment'=>'module-taxonomy')))); $output .= '
'; $output .= '
' . t('Terms in a free-tagging vocabulary can be built gradually as you create or edit content. This is often done used for blogs or photo management applications.') . '
'; $output .= '
' . t('Assigning vocabularies to content types') . '
'; - $output .= '
' . t('Before you can use a new vocabulary to classify your content, a new Taxonomy term field must be added to a content type on its manage fields page. When adding a taxonomy field, you choose a widget to use to enter the taxonomy information on the content editing page: a select list, checkboxes, radio buttons, or an auto-complete field (to build a free-tagging vocabulary). After choosing the field type and widget, on the subsequent field settings page you can choose the desired vocabulary, whether one or multiple terms can be chosen from the vocabulary, and other settings. The same vocabulary can be added to multiple content types, by using the "Re-use existing field" section on the manage fields page.', array('@ctedit' => \Drupal::url('node.overview_types'))) . '
'; + $output .= '
' . t('Before you can use a new vocabulary to classify your content, a new Taxonomy term field must be added to a content type on its manage fields page. When adding a taxonomy field, you choose a widget to use to enter the taxonomy information on the content editing page: a select list, checkboxes, radio buttons, or an auto-complete field (to build a free-tagging vocabulary). After choosing the field type and widget, on the subsequent field settings page you can choose the desired vocabulary, whether one or multiple terms can be chosen from the vocabulary, and other settings. The same vocabulary can be added to multiple content types, by using the "Re-use existing field" section on the manage fields page.', array('@ctedit' => \Drupal::url('entity.node_type.collection'))) . '
'; $output .= '
' . t('Classifying content') . '
'; $output .= '
' . t('After the vocabulary is assigned to the content type, you can start classifying content. The field with terms will appear on the content editing screen when you edit or add new content.', array('@addnode' => \Drupal::url('node.add_page'))) . '
'; $output .= '
' . t('Viewing listings') . '
'; @@ -77,7 +77,7 @@ function taxonomy_help($route_name, RouteMatchInterface $route_match) { $output .= '
'; return $output; - case 'taxonomy.vocabulary_list': + case 'entity.taxonomy_vocabulary.collection': $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' => '', '#tree' => TRUE); @@ -130,7 +130,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { drupal_set_message($message, $redirect ? 'error' : 'warning'); // If only user 1 was selected, redirect to the overview. if ($redirect) { - return $this->redirect('user.admin_account'); + return $this->redirect('entity.user.collection'); } } @@ -197,7 +197,7 @@ public function submitForm(array &$form, FormStateInterface $form_state) { } } } - $form_state->setRedirect('user.admin_account'); + $form_state->setRedirect('entity.user.collection'); } } diff --git a/core/modules/user/src/Form/UserRoleDelete.php b/core/modules/user/src/Form/UserRoleDelete.php index 12d9662fee0a77141aae4a7d71f1ef1a4d456fbf..aa0f7d2a68f11813c9be7907d5ad3ece113d12de 100644 --- a/core/modules/user/src/Form/UserRoleDelete.php +++ b/core/modules/user/src/Form/UserRoleDelete.php @@ -9,7 +9,6 @@ use Drupal\Core\Entity\EntityConfirmFormBase; use Drupal\Core\Form\FormStateInterface; -use Drupal\Core\Url; /** * Provides a deletion confirmation form for Role entity. @@ -27,7 +26,7 @@ public function getQuestion() { * {@inheritdoc} */ public function getCancelUrl() { - return new Url('user.role_list'); + return $this->entity->urlInfo('collection'); } /** diff --git a/core/modules/user/src/RoleForm.php b/core/modules/user/src/RoleForm.php index b05c164eaf96507afe1a4d26255dc4db0ed04c40..bb801eaddeb03628608f6186499b1af7abef047d 100644 --- a/core/modules/user/src/RoleForm.php +++ b/core/modules/user/src/RoleForm.php @@ -68,7 +68,7 @@ public function save(array $form, FormStateInterface $form_state) { drupal_set_message($this->t('Role %label has been added.', array('%label' => $entity->label()))); $this->logger('user')->notice('Role %label has been added.', array('%label' => $entity->label(), 'link' => $edit_link)); } - $form_state->setRedirect('user.role_list'); + $form_state->setRedirect('entity.user_role.collection'); } } diff --git a/core/modules/user/tests/src/Unit/Menu/UserLocalTasksTest.php b/core/modules/user/tests/src/Unit/Menu/UserLocalTasksTest.php index 22d2ea4d9ddecf7bdb0a567cac81c7407c07f8b8..fb7bb82a6ca9dea3750563452d949c4bd498ba32 100644 --- a/core/modules/user/tests/src/Unit/Menu/UserLocalTasksTest.php +++ b/core/modules/user/tests/src/Unit/Menu/UserLocalTasksTest.php @@ -35,9 +35,9 @@ public function testUserAdminLocalTasks($route, $expected) { */ public function getUserAdminRoutes() { return array( - array('user.admin_account', array(array('user.admin_account', 'user.admin_permissions', 'user.role_list'))), - array('user.admin_permissions', array(array('user.admin_account', 'user.admin_permissions', 'user.role_list'))), - array('user.role_list', array(array('user.admin_account', 'user.admin_permissions', 'user.role_list'))), + array('entity.user.collection', array(array('entity.user.collection', 'user.admin_permissions', 'entity.user_role.collection'))), + array('user.admin_permissions', array(array('entity.user.collection', 'user.admin_permissions', 'entity.user_role.collection'))), + array('entity.user_role.collection', array(array('entity.user.collection', 'user.admin_permissions', 'entity.user_role.collection'))), array('entity.user.admin_form', array(array('user.account_settings_tab'))), ); } diff --git a/core/modules/user/user.links.action.yml b/core/modules/user/user.links.action.yml index 2a1f8929be264879c383ec037fdecbb5cdd0c7ec..901c7905cac151d918263691539cf96fafa3f9ce 100644 --- a/core/modules/user/user.links.action.yml +++ b/core/modules/user/user.links.action.yml @@ -2,9 +2,9 @@ user_admin_create: route_name: user.admin_create title: 'Add user' appears_on: - - user.admin_account + - entity.user.collection user.role_add: route_name: user.role_add title: 'Add role' appears_on: - - user.role_list + - entity.user_role.collection diff --git a/core/modules/user/user.links.menu.yml b/core/modules/user/user.links.menu.yml index 62cfe51237c06d80a9fac480db9c1d0688e67c6b..46a2947f5b0ebb253e82f2661bfb2ad2eb028540 100644 --- a/core/modules/user/user.links.menu.yml +++ b/core/modules/user/user.links.menu.yml @@ -8,9 +8,9 @@ user.logout: route_name: user.logout weight: 10 menu_name: account -user.admin_account: +entity.user.collection: title: People - route_name: user.admin_account + route_name: entity.user.collection description: 'Manage user accounts, roles, and permissions.' parent: system.admin weight: 4 diff --git a/core/modules/user/user.links.task.yml b/core/modules/user/user.links.task.yml index be5138105719ea1c91bfc04d02ec716b6326058b..5b0d1648f46a6c8ef974a0dc22bfd7de60cc2f41 100644 --- a/core/modules/user/user.links.task.yml +++ b/core/modules/user/user.links.task.yml @@ -34,18 +34,18 @@ entity.user.edit_form: base_route: entity.user.canonical title: Edit -user.admin_account: +entity.user.collection: title: List - route_name: user.admin_account - base_route: user.admin_account + route_name: entity.user.collection + base_route: entity.user.collection user.admin_permissions: title: Permissions route_name: user.admin_permissions - base_route: user.admin_account + base_route: entity.user.collection -user.role_list: +entity.user_role.collection: title: 'Roles' - route_name: user.role_list - base_route: user.admin_account + route_name: entity.user_role.collection + base_route: entity.user.collection weight: 10 diff --git a/core/modules/user/user.module b/core/modules/user/user.module index 7995031993699a36f7ab8cfa54d832312f70f880..ebd4ced4636027b487823c60d3543b1e0b4d8e79 100644 --- a/core/modules/user/user.module +++ b/core/modules/user/user.module @@ -54,9 +54,9 @@ function user_help($route_name, RouteMatchInterface $route_match) { $output .= '

' . t('Uses') . '

'; $output .= '
'; $output .= '
' . t('Creating and managing users') . '
'; - $output .= '
' . t('Through the People administration page you can add and cancel user accounts and assign users to roles. By editing one particular user you can change their username, email address, password, and information in other fields.', array('!people' => \Drupal::url('user.admin_account'))) . '
'; + $output .= '
' . t('Through the People administration page you can add and cancel user accounts and assign users to roles. By editing one particular user you can change their username, email address, password, and information in other fields.', array('!people' => \Drupal::url('entity.user.collection'))) . '
'; $output .= '
' . t('Configuring user roles') . '
'; - $output .= '
' . t('Roles are used to group and classify users; each user can be assigned one or more roles. Typically there are two pre-defined roles: Anonymous user (users that are not logged in), and Authenticated user (users that are registered and logged in). Depending on how your site was set up, an Administrator role may also be available: users with this role will automatically be assigned any new permissions whenever a module is enabled. You can create additional roles on the Roles administration page.', array('!roles' => \Drupal::url('user.role_list'))) . '
'; + $output .= '
' . t('Roles are used to group and classify users; each user can be assigned one or more roles. Typically there are two pre-defined roles: Anonymous user (users that are not logged in), and Authenticated user (users that are registered and logged in). Depending on how your site was set up, an Administrator role may also be available: users with this role will automatically be assigned any new permissions whenever a module is enabled. You can create additional roles on the Roles administration page.', array('!roles' => \Drupal::url('entity.user_role.collection'))) . '
'; $output .= '
' . t('Setting permissions') . '
'; $output .= '
' . t('After creating roles, you can set permissions for each role on the Permissions page. Granting a permission allows users who have been assigned a particular role to perform an action on the site, such as viewing content, editing or creating a particular type of content, administering settings for a particular module, or using a particular function of the site (such as search).', array('!permissions_user' => \Drupal::url('user.admin_permissions'))) . '
'; $output .= '
' . t('Managing account settings') . '
'; @@ -70,9 +70,9 @@ function user_help($route_name, RouteMatchInterface $route_match) { return '

' . 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 .= '

' . t('Uses') . '

'; $output .= '
'; $output .= '
' . t('Creating and managing views.') . '
'; - $output .= '
' . t('Views can be created from the Views list page by using the "Add new view" action. Existing views can be managed from the Views list page by locating the view in the "Enabled" or "Disabled" list and selecting the desired operation action, for example "Edit".', array('@list' => \Drupal::url('views_ui.list', array('name' => 'views_ui')))) . '
'; + $output .= '
' . t('Views can be created from the Views list page by using the "Add new view" action. Existing views can be managed from the Views list page by locating the view in the "Enabled" or "Disabled" list and selecting the desired operation action, for example "Edit".', array('@list' => \Drupal::url('entity.view.collection', array('name' => 'views_ui')))) . '
'; $output .= '
' . t('Enabling and disabling views.') . '
'; - $output .= '
' . t('Views can be enabled or disabled from the Views list page. To enable a view, find the view within the "Disabled" list and select the "Enable" operation. To disable a view find the view within the "Enabled" list and select the "Disable" operation.', array('@list' => \Drupal::url('views_ui.list', array('name' => 'views_ui')))) . '
'; + $output .= '
' . t('Views can be enabled or disabled from the Views list page. To enable a view, find the view within the "Disabled" list and select the "Enable" operation. To disable a view find the view within the "Enabled" list and select the "Disable" operation.', array('@list' => \Drupal::url('entity.view.collection', array('name' => 'views_ui')))) . '
'; $output .= '
' . t('Exporting and importing views.') . '
'; $output .= '
' . t('Views can be exported and imported as configuration files by using the Configuration Manager module.', array('@config' => \Drupal::url('help.page', array('name' => 'config')))) . '
'; $output .= '
' . t('Theming views.') . '
'; @@ -60,7 +60,8 @@ function views_ui_entity_type_build(array &$entity_types) { ->setLinkTemplate('delete-form', '/admin/structure/views/view/{view}/delete') ->setLinkTemplate('enable', '/admin/structure/views/view/{view}/enable') ->setLinkTemplate('disable', '/admin/structure/views/view/{view}/disable') - ->setLinkTemplate('break-lock-form', '/admin/structure/views/view/{view}/break-lock'); + ->setLinkTemplate('break-lock-form', '/admin/structure/views/view/{view}/break-lock') + ->setLinkTemplate('collection', '/admin/structure/views'); } /** diff --git a/core/modules/views_ui/views_ui.routing.yml b/core/modules/views_ui/views_ui.routing.yml index 43e36341b8fc5d8e0286ec0916e1e35aeb19ff44..0b95812f6b449e5b85bd8cdf915138017e216971 100644 --- a/core/modules/views_ui/views_ui.routing.yml +++ b/core/modules/views_ui/views_ui.routing.yml @@ -1,4 +1,4 @@ -views_ui.list: +entity.view.collection: path: '/admin/structure/views' defaults: _entity_list: 'view'