diff --git a/core/modules/action/action.module b/core/modules/action/action.module index ee2f628..71e18ef 100644 --- a/core/modules/action/action.module +++ b/core/modules/action/action.module @@ -48,11 +48,11 @@ function action_permission() { * Implements hook_menu_link_defaults(). */ function action_menu_link_defaults() { - $links['action.admin.actions'] = array( + $links['action.admin'] = array( 'link_title' => 'Actions', 'description' => 'Manage the actions defined for your site.', 'route_name' => 'action.admin', - 'parent' => 'system.admin.config.system', + 'parent' => 'system.admin_config_system', ); return $links; diff --git a/core/modules/aggregator/aggregator.module b/core/modules/aggregator/aggregator.module index 78a8e17..3ab717d 100644 --- a/core/modules/aggregator/aggregator.module +++ b/core/modules/aggregator/aggregator.module @@ -96,10 +96,10 @@ function aggregator_menu_link_defaults() { 'link_title' => 'Feed aggregator', 'description' => "Configure which content your site aggregates from other sites, how often it polls them, and how they're categorized.", 'route_name' => 'aggregator.admin_overview', - 'parent' => 'system.admin.config.services', + 'parent' => 'system.admin_config_services', 'weight' => 10, ); - $links['aggregator'] = array( + $links['aggregator.page_last'] = array( 'link_title' => 'Feed aggregator', 'weight' => 5, 'route_name' => 'aggregator.page_last', diff --git a/core/modules/ban/ban.module b/core/modules/ban/ban.module index e45ed13..03201c9 100644 --- a/core/modules/ban/ban.module +++ b/core/modules/ban/ban.module @@ -41,12 +41,12 @@ function ban_permission() { * Implements hook_menu_link_defaults(). */ function ban_menu_link_defaults() { - $links['ban.admin.config.people'] = array( + $links['ban.admin_page'] = array( 'link_title' => 'IP address bans', 'description' => 'Manage banned IP addresses.', 'route_name' => 'ban.admin_page', 'weight' => 10, - 'parent' => 'user.admin.config.people', + 'parent' => 'user.admin_index', ); return $links; diff --git a/core/modules/block/block.module b/core/modules/block/block.module index 1bca18b..8d96d06 100644 --- a/core/modules/block/block.module +++ b/core/modules/block/block.module @@ -96,9 +96,9 @@ function block_permission() { * Implements hook_menu_link_defaults(). */ function block_menu_link_defaults() { - $links['block.admin.structure'] = array( + $links['block.admin_display'] = array( 'link_title' => 'Block layout', - 'parent' => 'system.admin.structure', + 'parent' => 'system.admin_structure', 'description' => 'Configure what block content appears in your site\'s sidebars and other regions.', 'route_name' => 'block.admin_display', ); diff --git a/core/modules/block/custom_block/custom_block.module b/core/modules/block/custom_block/custom_block.module index fd50c03..4f3677d 100644 --- a/core/modules/block/custom_block/custom_block.module +++ b/core/modules/block/custom_block/custom_block.module @@ -38,24 +38,6 @@ function custom_block_help($path, $arg) { } /** - * Implements hook_menu_link_defaults(). - */ -function custom_block_menu_link_defaults() { - $links['custom_block.add_page'] = array( - 'link_title' => 'Add custom block', - 'description' => 'Add custom block', - 'route_name' => 'custom_block.add_page', - ); - $items['custom_block.list'] = array( - 'link_title' => 'Custom block library', - 'parent' => 'block.admin.structure', - 'description' => 'Manage custom blocks.', - ); - - return $links; -} - -/** * Implements hook_theme(). */ function custom_block_theme($existing, $type, $theme, $path) { diff --git a/core/modules/book/book.module b/core/modules/book/book.module index 48c81d5..68de36d 100644 --- a/core/modules/book/book.module +++ b/core/modules/book/book.module @@ -151,13 +151,13 @@ function book_node_links_alter(array &$node_links, NodeInterface $node, array &$ * Implements hook_menu_link_defaults(). */ function book_menu_link_defaults() { - $links['book.admin.outlines'] = array( + $links['book.admin'] = array( 'link_title' => 'Books', 'description' => "Manage your site's book outlines.", - 'parent' => 'system.admin.structure', + 'parent' => 'system.admin_structure', 'route_name' => 'book.admin', ); - $links['book'] = array( + $links['book.render'] = array( 'link_title' => 'Books', 'route_name' => 'book.render', // @todo what to do about MENU_SUGGESTED_ITEM, maybe specify no menu_name? diff --git a/core/modules/comment/comment.module b/core/modules/comment/comment.module index cae0c33..07b177e 100644 --- a/core/modules/comment/comment.module +++ b/core/modules/comment/comment.module @@ -168,16 +168,16 @@ function comment_theme() { * Implements hook_menu_link_defaults(). */ function comment_menu_link_defaults() { - $links['comment.admin.content.comment'] = array( + $links['comment.admin'] = array( 'link_title' => 'Comments', 'route_name' => 'comment.admin', - 'parent' => \Drupal::moduleHandler()->moduleExists('node') ? 'node.admin.content' : 'system.admin', + 'parent' => \Drupal::moduleHandler()->moduleExists('node') ? 'node.content_overview' : 'system.admin', 'description' => 'List and edit site comments and the comment approval queue.', ); - $links['comment.admin.structure.comments'] = array( + $links['comment.bundle_list'] = array( 'link_title' => 'Comment forms', 'route_name' => 'comment.bundle_list', - 'parent' => 'system.admin.structure', + 'parent' => 'system.admin_structure', 'description' => 'Manage fields and displays settings for comment forms.', ); @@ -187,10 +187,10 @@ function comment_menu_link_defaults() { /** * Implements hook_menu_link_defaults_alter() */ -function comment_menu_links_defaults_alter(&$links) { - if (isset($links['node.admin.content'])) { +function comment_menu_link_defaults_alter(&$links) { + if (isset($links['node.content_overview'])) { // Add comments to the description for admin/content if any. - $links['node.admin.content']['description'] = 'Administer content and comments.'; + $links['node.content_overview']['description'] = 'Administer content and comments.'; } } diff --git a/core/modules/config/config.module b/core/modules/config/config.module index 776a9fc..11bddb6 100644 --- a/core/modules/config/config.module +++ b/core/modules/config/config.module @@ -61,11 +61,11 @@ function config_file_download($uri) { * Implements hook_menu_link_defaults(). */ function config_menu_link_defaults() { - $links['config.admin.management'] = array( + $links['config.sync'] = array( 'link_title' => 'Configuration management', 'description' => 'Import, export, or synchronize your site configuration.', 'route_name' => 'config.sync', - 'parent' => 'system.admin.config.development', + 'parent' => 'system.admin_config_development', ); return $links; diff --git a/core/modules/config_translation/config_translation.module b/core/modules/config_translation/config_translation.module index 2204689..f9abfb2 100644 --- a/core/modules/config_translation/config_translation.module +++ b/core/modules/config_translation/config_translation.module @@ -35,9 +35,9 @@ function config_translation_help($path) { * Implements hook_menu_link_defaults(). */ function config_translation_menu_link_defaults() { - $links['config_translation.admin.config-translation'] = array( + $links['config_translation.mapper_list'] = array( 'link_title' => 'Configuration translation', - 'parent' => 'system.admin.config.regional', + 'parent' => 'system.admin_config_regional', 'description' => 'Translate the configuration.', 'route_name' => 'config_translation.mapper_list', 'weight' => 30, diff --git a/core/modules/contact/contact.module b/core/modules/contact/contact.module index dc622ff..3894e8f 100644 --- a/core/modules/contact/contact.module +++ b/core/modules/contact/contact.module @@ -55,9 +55,9 @@ function contact_permission() { * Implements hook_menu_link_defaults(). */ function contact_menu_link_defaults() { - $links['contact.admin.categories'] = array( + $links['contact.category_list'] = array( 'link_title' => 'Contact form categories', - 'parent' => 'system.admin.structure', + 'parent' => 'system.admin_structure', 'description' => 'Create a system contact form and set up categories for the form to use.', 'route_name' => 'contact.category_list', ); diff --git a/core/modules/content_translation/content_translation.module b/core/modules/content_translation/content_translation.module index b6f8f5e..95cd875 100644 --- a/core/modules/content_translation/content_translation.module +++ b/core/modules/content_translation/content_translation.module @@ -233,8 +233,8 @@ function content_translation_menu_alter(array &$items) { */ function content_translation_menu_link_defaults_alter(array &$links) { // Clarify where translation settings are located. - $links['language.admin.language.content_settings_page']['link_title'] = 'Content language and translation'; - $links['language.admin.language.content_settings_page']['description'] = 'Configure language and translation support for content.'; + $links['language.content_settings_page']['link_title'] = 'Content language and translation'; + $links['language.content_settings_page']['description'] = 'Configure language and translation support for content.'; } /** diff --git a/core/modules/dblog/dblog.module b/core/modules/dblog/dblog.module index 33f0120..5052a8a 100644 --- a/core/modules/dblog/dblog.module +++ b/core/modules/dblog/dblog.module @@ -39,32 +39,32 @@ function dblog_help($path, $arg) { * Implements hook_menu_link_defaults(). */ function dblog_menu_link_defaults() { - $links['dblog.admin.reports.dblog'] = array( + $links['dblog.overview'] = array( 'link_title' => 'Recent log messages', - 'parent' => 'system.admin.reports', + 'parent' => 'system.admin_reports', 'description' => 'View events that have recently been logged.', 'route_name' => 'dblog.overview', 'weight' => -1, ); - $links['dblog.admin.reports.page-not-found'] = array( + $links['dblog.page_not_found'] = array( 'link_title' => "Top 'page not found' errors", 'route_name' => 'dblog.page_not_found', - 'parent' => 'system.admin.reports', + 'parent' => 'system.admin_reports', 'description' => "View 'page not found' errors (404s).", ); - $links['dblog.admin.reports.access-denied'] = array( + $links['dblog.access_denied'] = array( 'link_title' => "Top 'access denied' errors", 'route_name' => 'dblog.access_denied', 'description' => "View 'access denied' errors (403s).", - 'parent' => 'system.admin.reports', + 'parent' => 'system.admin_reports', ); if (\Drupal::moduleHandler()->moduleExists('search')) { - $links['dblog.admin.reports.search'] = array( + $links['dblog.search'] = array( 'link_title' => 'Top search phrases', 'route_name' => 'dblog.search', 'description' => 'View most popular search phrases.', - 'parent' => 'system.admin.reports', + 'parent' => 'system.admin_reports', ); } diff --git a/core/modules/editor/editor.module b/core/modules/editor/editor.module index e3ff037..3b2911b 100644 --- a/core/modules/editor/editor.module +++ b/core/modules/editor/editor.module @@ -45,8 +45,8 @@ function editor_help($path, $arg) { * of text editors. */ function editor_menu_link_defaults_alter(array &$links) { - $links['filter.admin.formats']['link_title'] = 'Text formats and editors'; - $links['filter.admin.formats']['description'] = 'Configure how user-contributed content is filtered and formatted, as well as the text editor user interface (WYSIWYGs or toolbars).'; + $links['filter.admin_overview']['link_title'] = 'Text formats and editors'; + $links['filter.admin_overview']['description'] = 'Configure how user-contributed content is filtered and formatted, as well as the text editor user interface (WYSIWYGs or toolbars).'; } /** diff --git a/core/modules/entity/entity.module b/core/modules/entity/entity.module index de5b1b9..cc22891 100644 --- a/core/modules/entity/entity.module +++ b/core/modules/entity/entity.module @@ -48,27 +48,27 @@ function entity_permission() { * Implements hook_menu_link_defaults(). */ function entity_menu_link_defaults() { - $links['entity.admin.structure.display_modes'] = array( + $links['entity.display_mode'] = array( 'link_title' => 'Display modes', 'description' => 'Configure what displays are available for your content and forms.', 'route_name' => 'entity.display_mode', - 'parent' => 'system.admin.structure', + 'parent' => 'system.admin_structure', ); // View modes. - $links['entity.admin.structure.display_modes.view'] = array( + $links['entity.view_mode_list'] = array( 'link_title' => 'View modes', 'description' => 'Manage custom view modes.', 'route_name' => 'entity.view_mode_list', - 'parent' => 'entity.admin.structure.display_modes', + 'parent' => 'entity.display_mode', ); // Form modes. - $links['entity.admin.structure.display_modes.form'] = array( + $links['entity.form_mode_list'] = array( 'link_title' => 'Form modes', 'description' => 'Manage custom form modes.', 'route_name' => 'entity.form_mode_list', - 'parent' => 'entity.admin.structure.display_modes', + 'parent' => 'entity.display_mode', ); return $links; diff --git a/core/modules/field_ui/field_ui.module b/core/modules/field_ui/field_ui.module index a08593a..e05b471 100644 --- a/core/modules/field_ui/field_ui.module +++ b/core/modules/field_ui/field_ui.module @@ -56,11 +56,11 @@ function field_ui_help($path, $arg) { * Implements hook_menu_link_defaults(). */ function field_ui_menu_link_defaults() { - $links['field_ui.admin.reports.fields'] = array( + $links['field_ui.list'] = array( 'link_title' => 'Field list', 'description' => 'Overview of fields on all entity types.', 'route_name' => 'field_ui.list', - 'parent' => 'system.admin.reports', + 'parent' => 'system.admin_reports', ); return $links; diff --git a/core/modules/filter/filter.module b/core/modules/filter/filter.module index 1e858ad..9c166e5 100644 --- a/core/modules/filter/filter.module +++ b/core/modules/filter/filter.module @@ -98,15 +98,15 @@ function filter_element_info() { * Implements hook_menu_link_defaults(). */ function filter_menu_link_defaults() { - $links['filter.tips'] = array( + $links['filter.tips_all'] = array( 'link_title' => 'Compose tips', 'type' => MENU_SUGGESTED_ITEM, 'route_name' => 'filter.tips_all', ); - $links['filter.admin.formats'] = array( + $links['filter.admin_overview'] = array( 'link_title' => 'Text formats', - 'parent' => 'system.admin.config.content', + 'parent' => 'system.admin_config_content', 'description' => 'Configure how content input by users is filtered, including allowed HTML tags. Also allows enabling of module-provided filters.', 'route_name' => 'filter.admin_overview', ); diff --git a/core/modules/forum/forum.module b/core/modules/forum/forum.module index 959a700..b9c18e2 100644 --- a/core/modules/forum/forum.module +++ b/core/modules/forum/forum.module @@ -99,18 +99,18 @@ function forum_theme() { * Implements hook_menu_link_defaults(). */ function forum_menu_link_defaults() { - $items['forum'] = array( + $links['forum.index'] = array( 'link_title' => 'Forums', 'route_name' => 'forum.index', 'menu_name' => 'tools', ); - $items['forum.admin.overview'] = array( + $links['forum.overview'] = array( 'link_title' => 'Forums', - 'parent' => 'system.admin.structure', + 'parent' => 'system.admin_structure', 'description' => 'Control forum hierarchy settings.', 'route_name' => 'forum.overview', ); - return $items; + return $links; } /** diff --git a/core/modules/image/image.module b/core/modules/image/image.module index c1420c1..472cad4 100644 --- a/core/modules/image/image.module +++ b/core/modules/image/image.module @@ -87,10 +87,10 @@ function image_help($path, $arg) { * Implements hook_menu_link_defaults(). */ function image_menu_link_defaults() { - $links['image.admin.media.image-styles'] = array( + $links['image.style_list'] = array( 'link_title' => 'Image styles', 'description' => 'Configure styles that can be used for resizing or adjusting images on display.', - 'parent' => 'system.admin.config.media', + 'parent' => 'system.admin_config_media', 'route_name' => 'image.style_list', ); diff --git a/core/modules/language/language.module b/core/modules/language/language.module index f196969..c616837 100644 --- a/core/modules/language/language.module +++ b/core/modules/language/language.module @@ -73,18 +73,18 @@ function language_help($path, $arg) { */ function language_menu_link_defaults() { // Base language management and configuration. - $links['language.admin.language.admin_overview'] = array( + $links['language.admin_overview'] = array( 'link_title' => 'Languages', 'description' => 'Configure languages for content and the user interface.', 'route_name' => 'language.admin_overview', - 'parent' => 'system.admin.config.regional', + 'parent' => 'system.admin_config_regional', ); // Content language settings. - $links['language.admin.language.content_settings_page'] = array( + $links['language.content_settings_page'] = array( 'link_title' => 'Content language', 'description' => 'Configure language support for content.', 'route_name' => 'language.content_settings_page', - 'parent' => 'system.admin.config.regional', + 'parent' => 'system.admin_config_regional', 'weight' => 10, ); diff --git a/core/modules/locale/locale.module b/core/modules/locale/locale.module index 324be33..68a4d1d 100644 --- a/core/modules/locale/locale.module +++ b/core/modules/locale/locale.module @@ -172,19 +172,19 @@ function locale_help($path, $arg) { */ function locale_menu_link_defaults() { // Translation functionality. - $links['locale.admin.config.regional.translate'] = array( + $links['locale.translate_page'] = array( 'link_title' => 'User interface translation', 'description' => 'Translate the built-in user interface.', 'route_name' => 'locale.translate_page', - 'parent' => 'system.admin.config.regional', + 'parent' => 'system.admin_config_regional', 'weight' => 15, ); - $links['locale.admin.reports.translations'] = array( + $links['locale.translate_status'] = array( 'link_title' => 'Available translation updates', 'route_name' => 'locale.translate_status', 'description' => 'Get a status report about available interface translations for your installed modules and themes.', - 'parent' => 'system.admin.reports', + 'parent' => 'system.admin_reports', ); return $links; diff --git a/core/modules/menu/menu.module b/core/modules/menu/menu.module index 660e1df..6e05b22 100644 --- a/core/modules/menu/menu.module +++ b/core/modules/menu/menu.module @@ -66,11 +66,11 @@ function menu_permission() { * Implements hook_menu_link_defaults(). */ function menu_menu_link_defaults() { - $links['menu.admin.overview'] = array( + $links['menu.overview_page'] = array( 'link_title' => 'Menus', 'description' => 'Add new menus to your site, edit existing menus, and rename and reorganize menu links.', 'route_name' => 'menu.overview_page', - 'parent' => 'system.admin.structure', + 'parent' => 'system.admin_structure', ); return $links; } diff --git a/core/modules/node/node.module b/core/modules/node/node.module index c97851e..8e6576e 100644 --- a/core/modules/node/node.module +++ b/core/modules/node/node.module @@ -940,7 +940,7 @@ function _node_revision_access(NodeInterface $node, $op = 'view', $account = NUL * Implements hook_menu_link_defaults(). */ function node_menu_link_defaults() { - $links['node.admin.content'] = array( + $links['node.content_overview'] = array( 'link_title' => 'Content', 'route_name' => 'node.content_overview', 'parent' => 'system.admin', @@ -948,13 +948,13 @@ function node_menu_link_defaults() { 'weight' => -10, ); - $links['node.admin.structure.types'] = array( + $links['node.overview_types'] = array( 'link_title' => 'Content types', - 'parent' => 'system.admin.structure', + 'parent' => 'system.admin_structure', 'description' => 'Manage content types, including default status, front page promotion, comment settings, etc.', 'route_name' => 'node.overview_types', ); - $links['node.add'] = array( + $links['node.add_page'] = array( 'link_title' => 'Add content', 'route_name' => 'node.add_page', ); diff --git a/core/modules/path/path.module b/core/modules/path/path.module index 704f9a2..cf20fa6 100644 --- a/core/modules/path/path.module +++ b/core/modules/path/path.module @@ -58,11 +58,11 @@ function path_permission() { * Implements hook_menu_link_defaults(). */ function path_menu_link_defaults() { - $links['path.admin.overview'] = array( + $links['path.admin_overview'] = array( 'link_title' => 'URL aliases', 'description' => "Change your site's URL paths by aliasing them.", 'route_name' => 'path.admin_overview', - 'parent' => 'system.admin.config.search', + 'parent' => 'system.admin_config_search', 'weight' => -5, ); diff --git a/core/modules/responsive_image/responsive_image.module b/core/modules/responsive_image/responsive_image.module index 5113afc..6865a81 100644 --- a/core/modules/responsive_image/responsive_image.module +++ b/core/modules/responsive_image/responsive_image.module @@ -72,12 +72,12 @@ function responsive_image_menu() { * Implements hook_menu_link_defaults(). */ function responsive_image_menu_link_defaults() { - $links['responsive_image.admin.config.responsive_imagemapping'] = array( + $links['responsive_image.mapping_page'] = array( 'link_title' => 'Responsive image mappings', 'description' => 'Manage responsive image mappings', 'weight' => 10, 'route_name' => 'responsive_image.mapping_page', - 'parent' => 'system.admin.config.media', + 'parent' => 'system.admin_config_media', ); return $links; diff --git a/core/modules/search/search.module b/core/modules/search/search.module index d8e3e3b..62822e5 100644 --- a/core/modules/search/search.module +++ b/core/modules/search/search.module @@ -142,14 +142,14 @@ function search_preprocess_block(&$variables) { * Implements hook_menu_link_defaults(). */ function search_menu_link_defaults() { - $links['search'] = array( + $links['search.view'] = array( 'link_title' => 'Search', 'route_name' => 'search.view', 'type' => MENU_SUGGESTED_ITEM, ); - $links['search.admin.settings'] = array( + $links['search.settings'] = array( 'link_title' => 'Search settings', - 'parent' => 'system.admin.config.search', + 'parent' => 'system.admin_config_search', 'description' => 'Configure relevance settings for search and other indexing options.', 'route_name' => 'search.settings', 'weight' => -10, diff --git a/core/modules/shortcut/shortcut.module b/core/modules/shortcut/shortcut.module index ba0b04a..18b07b8 100644 --- a/core/modules/shortcut/shortcut.module +++ b/core/modules/shortcut/shortcut.module @@ -65,11 +65,11 @@ function shortcut_permission() { * Implements hook_menu_link_defaults(). */ function shortcut_menu_link_defaults() { - $links['shortcut.admin.config.user-interface.shortcut'] = array( + $links['shortcut.set_admin'] = array( 'link_title' => 'Shortcuts', 'description' => 'Add and modify shortcut sets.', 'route_name' => 'shortcut.set_admin', - 'parent' => 'system.admin.config.user-interface', + 'parent' => 'system.admin_config_ui', ); return $links; diff --git a/core/modules/simpletest/simpletest.module b/core/modules/simpletest/simpletest.module index 4138f60..cf28391 100644 --- a/core/modules/simpletest/simpletest.module +++ b/core/modules/simpletest/simpletest.module @@ -38,11 +38,11 @@ function simpletest_help($path, $arg) { * Implements hook_menu_link_defaults(). */ function simpletest_menu_link_defaults() { - $links['simpletest.admin.config.development.testing'] = array( + $links['simpletest.test_form'] = array( 'link_title' => 'Testing', 'description' => 'Run tests against Drupal core and your modules. These tests help assure that your site code is working as designed.', 'route_name' => 'simpletest.test_form', - 'parent' => 'system.admin.config.development', + 'parent' => 'system.admin_config_development', 'weight' => -5, ); diff --git a/core/modules/statistics/statistics.module b/core/modules/statistics/statistics.module index 7e198f7..decbc02 100644 --- a/core/modules/statistics/statistics.module +++ b/core/modules/statistics/statistics.module @@ -82,11 +82,11 @@ function statistics_node_links_alter(array &$node_links, NodeInterface $entity, * Implements hook_menu_link_defaults(). */ function statistics_menu_link_defaults() { - $links['statistics.admin.config.system.statistics'] = array( + $links['statistics.settings'] = array( 'link_title' => 'Statistics', 'description' => 'Control details about what and how your site logs content statistics.', 'route_name' => 'statistics.settings', - 'parent' => 'system.admin.config.system', + 'parent' => 'system.admin_config_system', 'weight' => -15, ); return $links; diff --git a/core/modules/system/system.api.php b/core/modules/system/system.api.php index 8ae6c7c..49f9818 100644 --- a/core/modules/system/system.api.php +++ b/core/modules/system/system.api.php @@ -492,7 +492,7 @@ function hook_page_build(&$page) { * @see hook_menu_link_defaults_alter() */ function hook_menu_link_defaults() { - $links['user'] = array( + $links['user.page'] = array( 'link_title' => 'My account', 'weight' => -10, 'route_name' => 'user.page', diff --git a/core/modules/system/system.module b/core/modules/system/system.module index 9227c8a..bfac1cd 100644 --- a/core/modules/system/system.module +++ b/core/modules/system/system.module @@ -653,7 +653,7 @@ function system_element_info() { * Implements hook_menu_link_defaults(). */ function system_menu_link_defaults() { - $items['system.admin'] = array( + $links['system.admin'] = array( 'link_title' => 'Administration', 'route_name' => 'system.admin', 'weight' => 9, @@ -661,7 +661,7 @@ function system_menu_link_defaults() { ); // Menu items that are basically just menu blocks. - $items['system.admin.structure'] = array( + $links['system.admin_structure'] = array( 'route_name' => 'system.admin_structure', 'parent' => 'system.admin', 'description' => 'Administer blocks, content types, menus, etc.', @@ -669,7 +669,7 @@ function system_menu_link_defaults() { 'weight' => -8, ); // Appearance. - $items['system.admin.appearance'] = array( + $links['system.themes_page'] = array( 'route_name' => 'system.themes_page', 'link_title' => 'Appearance', 'description' => 'Select and configure your themes.', @@ -677,7 +677,7 @@ function system_menu_link_defaults() { 'weight' => -6, ); // Modules. - $items['system.admin.modules'] = array( + $links['system.modules_list'] = array( 'link_title' => 'Extend', 'description' => 'Add and enable modules to extend site functionality.', 'parent' => 'system.admin', @@ -685,7 +685,7 @@ function system_menu_link_defaults() { 'weight' => -2, ); // Configuration. - $items['system.admin.config'] = array( + $links['system.admin_config'] = array( 'link_title' => 'Configuration', 'parent' => 'system.admin', 'description' => 'Administer settings.', @@ -694,162 +694,162 @@ function system_menu_link_defaults() { ); // Media settings. - $items['system.admin.config.media'] = array( + $links['system.admin_config_media'] = array( 'route_name' => 'system.admin_config_media', - 'parent' => 'system.admin.config', + 'parent' => 'system.admin_config', 'link_title' => 'Media', 'weight' => -10, ); - $items['system.admin.config.media.file-system'] = array( + $links['system.file_system_settings'] = array( 'link_title' => 'File system', 'description' => 'Tell Drupal where to store uploaded files and how they are accessed.', - 'parent' => 'system.admin.config.media', + 'parent' => 'system.admin_config_media', 'route_name' => 'system.file_system_settings', ); - $items['system.admin.config.media.image-toolkit'] = array( + $links['system.image_toolkit_settings'] = array( 'link_title' => 'Image toolkit', - 'parent' => 'system.admin.config.media', + 'parent' => 'system.admin_config_media', 'route_name' => 'system.image_toolkit_settings', 'description' => 'Choose which image toolkit to use if you have installed optional toolkits.', 'weight' => 20, ); // Service settings. - $items['system.admin.config.services'] = array( + $links['system.admin_config_services'] = array( 'link_title' => 'Web services', - 'parent' => 'system.admin.config', + 'parent' => 'system.admin_config', 'route_name' => 'system.admin_config_services', ); - $items['system.admin.config.services.rss-publishing'] = array( + $links['system.rss_feeds_settings'] = array( 'link_title' => 'RSS publishing', - 'parent' => 'system.admin.config.services', + 'parent' => 'system.admin_config_services', 'description' => 'Configure the site description, the number of items per feed and whether feeds should be titles/teasers/full-text.', 'route_name' => 'system.rss_feeds_settings', ); // Development settings. - $items['system.admin.config.development'] = array( + $links['system.admin_config_development'] = array( 'route_name' => 'system.admin_config_development', - 'parent' => 'system.admin.config', + 'parent' => 'system.admin_config', 'link_title' => 'Development', 'description' => 'Development tools.', 'weight' => -10, ); - $items['system.admin.config.development.maintenance'] = array( + $links['system.site_maintenance_mode'] = array( 'link_title' => 'Maintenance mode', - 'parent' => 'system.admin.config.development', + 'parent' => 'system.admin_config_development', 'description' => 'Take the site offline for maintenance or bring it back online.', 'route_name' => 'system.site_maintenance_mode', 'weight' => -10, ); - $items['system.admin.config.development.performance'] = array( + $links['system.performance_settings'] = array( 'link_title' => 'Performance', - 'parent' => 'system.admin.config.development', + 'parent' => 'system.admin_config_development', 'description' => 'Enable or disable page caching for anonymous users and set CSS and JS bandwidth optimization options.', 'route_name' => 'system.performance_settings', 'weight' => -20, ); - $items['system.admin.config.development.logging'] = array( + $links['system.logging_settings'] = array( 'link_title' => 'Logging and errors', - 'parent' => 'system.admin.config.development', + 'parent' => 'system.admin_config_development', 'description' => "Settings for logging and alerts modules. Various modules can route Drupal's system events to different destinations, such as syslog, database, email, etc.", 'route_name' => 'system.logging_settings', 'weight' => -15, ); // Regional and date settings. - $items['system.admin.config.regional'] = array( + $links['system.admin_config_regional'] = array( 'route_name' => 'system.admin_config_regional', 'link_title' => 'Regional and language', - 'parent' => 'system.admin.config', + 'parent' => 'system.admin_config', 'description' => 'Regional settings, localization and translation.', 'weight' => -5, ); - $items['system.admin.config.regional.settings'] = array( + $links['system.regional_settings'] = array( 'link_title' => 'Regional settings', - 'parent' => 'system.admin.config.regional', + 'parent' => 'system.admin_config_regional', 'description' => "Settings for the site's default time zone and country.", 'route_name' => 'system.regional_settings', 'weight' => -20, ); - $items['system.admin.config.regional.date-time'] = array( + $links['system.date_format_list'] = array( 'link_title' => 'Date and time formats', - 'parent' => 'system.admin.config.regional', + 'parent' => 'system.admin_config_regional', 'description' => 'Configure display format strings for date and time.', 'route_name' => 'system.date_format_list', 'weight' => -9, ); // Search settings. - $items['system.admin.config.search'] = array( + $links['system.admin_config_search'] = array( 'link_title' => 'Search and metadata', 'route_name' => 'system.admin_config_search', - 'parent' => 'system.admin.config', + 'parent' => 'system.admin_config', 'description' => 'Local site search, metadata and SEO.', 'weight' => -10, ); // System settings. - $items['system.admin.config.system'] = array( + $links['system.admin_config_system'] = array( 'link_title' => 'System', 'route_name' => 'system.admin_config_system', - 'parent' => 'system.admin.config', + 'parent' => 'system.admin_config', 'description' => 'General system related configuration.', 'weight' => -20, ); - $items['system.admin.config.system.site-information'] = array( + $links['system.site_information_settings'] = array( 'link_title' => 'Site information', - 'parent' => 'system.admin.config.system', + 'parent' => 'system.admin_config_system', 'description' => 'Change site name, e-mail address, slogan, default front page, and number of posts per page, error pages.', 'route_name' => 'system.site_information_settings', 'weight' => -20, ); - $items['system.admin.config.system.cron'] = array( + $links['system.cron_settings'] = array( 'link_title' => 'Cron', - 'parent' => 'system.admin.config.system', + 'parent' => 'system.admin_config_system', 'description' => 'Manage automatic site maintenance tasks.', 'route_name' => 'system.cron_settings', 'weight' => 20, ); // Additional categories - $items['system.admin.config.user-interface'] = array( + $links['system.admin_config_ui'] = array( 'link_title' => 'User interface', 'route_name' => 'system.admin_config_ui', - 'parent' => 'system.admin.config', + 'parent' => 'system.admin_config', 'description' => 'Tools that enhance the user interface.', 'weight' => -15, ); - $items['system.admin.config.workflow'] = array( + $links['system.admin_config_workflow'] = array( 'link_title' => 'Workflow', 'route_name' => 'system.admin_config_workflow', - 'parent' => 'system.admin.config', + 'parent' => 'system.admin_config', 'description' => 'Content workflow, editorial workflow tools.', 'weight' => 5, ); - $items['system.admin.config.content'] = array( + $links['system.admin_config_content'] = array( 'link_title' => 'Content authoring', 'route_name' => 'system.admin_config_content', - 'parent' => 'system.admin.config', + 'parent' => 'system.admin_config', 'description' => 'Settings related to formatting and authoring content.', 'weight' => -15, ); // Reports. - $items['system.admin.reports'] = array( + $links['system.admin_reports'] = array( 'link_title' => 'Reports', 'route_name' => 'system.admin_reports', 'parent' => 'system.admin', 'description' => 'View reports, updates, and errors.', 'weight' => 5, ); - $items['system.admin.reports.status'] = array( + $links['system.status'] = array( 'link_title' => 'Status report', - 'parent' => 'system.admin.reports', + 'parent' => 'system.admin_reports', 'description' => "Get a status report about your site's operation and any detected problems.", 'route_name' => 'system.status', ); - return $items; + return $links; } /** diff --git a/core/modules/system/tests/modules/menu_test/menu_test.module b/core/modules/system/tests/modules/menu_test/menu_test.module index 08e6382..243ad55 100644 --- a/core/modules/system/tests/modules/menu_test/menu_test.module +++ b/core/modules/system/tests/modules/menu_test/menu_test.module @@ -12,42 +12,42 @@ */ function menu_test_menu_link_defaults() { // The name of the menu changes during the course of the test. Using a $_GET. - $items['menu_test.menu_name_test'] = array( + $links['menu_test.menu_name_test'] = array( 'link_title' => 'Test menu_name router item', 'route_name' => 'menu_test.menu_name_test', 'menu_name' => menu_test_menu_name(), ); // This item uses SystemController::systemAdminMenuBlockPage() to list child // items. - $items['menu_test.menu_callback_description'] = array( + $links['menu_test.menu_callback_description'] = array( 'link_title' => 'Menu item title', 'description' => 'Menu item description parent', 'route_name' => 'menu_test.callback_description', ); // This item tests the description key. - $items['menu_test.menu_callback_description.description-plain'] = array( + $links['menu_test.menu_callback_description.description-plain'] = array( 'link_title' => 'Menu item with a regular description', 'description' => 'Menu item description text', 'route_name' => 'menu_test.callback_description_plain', 'parent' => 'menu_test.menu_callback_description', ); - $items['menu_test.menu_no_title_callback'] = array( + $links['menu_test.menu_no_title_callback'] = array( 'link_title' => 'A title with @placeholder', 'route_name' => 'menu_test.menu_no_title_callback', ); // Hierarchical tests. - $items['menu_test.hierarchy_parent'] = array( + $links['menu_test.hierarchy_parent'] = array( 'link_title' => 'Parent menu router', 'route_name' => 'menu_test.hierarchy_parent', ); - $items['menu_test.hierarchy_parent.child'] = array( + $links['menu_test.hierarchy_parent.child'] = array( 'link_title' => 'Child menu router', 'route_name' => 'menu_test.hierarchy_parent_child', 'parent' => 'menu_test.hierarchy_parent', ); - $items['menu_test.hierarchy_parent.child2.child'] = array( + $links['menu_test.hierarchy_parent.child2.child'] = array( 'link_title' => 'Unattached subchild router', 'route_name' => 'menu_test.hierarchy_parent_child2', 'parent' => 'menu_test.hierarchy_parent.child', @@ -56,7 +56,7 @@ function menu_test_menu_link_defaults() { $exotic = " -._~!$'\"()*@[]?&+%#,;=:" . // "Special" ASCII characters. "%23%25%26%2B%2F%3F" . // Characters that look like a percent-escaped string. "éøïвβ中國書۞"; // Characters from various non-ASCII alphabets. - $items['menu_test.exotic_path'] = array( + $links['menu_test.exotic_path'] = array( 'link_title' => '"Exotic" path', 'route_name' => 'menu_test.exotic_path', 'route_parameters' => array('exotic' => $exotic), @@ -65,25 +65,25 @@ function menu_test_menu_link_defaults() { // Hidden tests; base parents. // Same structure as in Menu and Block modules. Since those structures can // change, we need to simulate our own in here. - $items['menu_test'] = array( + $links['menu_test'] = array( 'link_title' => 'Menu test root', 'route_name' => 'menu_test.menu_test', ); - $items['menu_test.hidden'] = array( + $links['menu_test.hidden'] = array( 'link_title' => 'Hidden test root', 'route_name' => 'menu_test.hidden', 'parent' => 'menu_test', ); // Hidden tests; one dynamic argument. - $items['menu_test.hidden.menu'] = array( + $links['menu_test.hidden.menu'] = array( 'link_title' => 'Menus', 'route_name' => 'menu_test.hidden_menu', 'parent' => 'menu_test.hidden', ); // Hidden tests; two dynamic arguments. - $items['menu_test.hidden.block'] = array( + $links['menu_test.hidden.block'] = array( 'link_title' => 'Blocks', 'route_name' => 'menu_test.hidden_block', 'parent' => 'menu_test.hidden', @@ -91,47 +91,47 @@ function menu_test_menu_link_defaults() { // Menu trail tests. // @see MenuTrailTestCase - $items['menu_test.menu-trail'] = array( + $links['menu_test.menu-trail'] = array( 'link_title' => 'Menu trail - Case 1', 'route_name' => 'menu_test.menu_trail', 'parent' => 'menu_test', ); - $items['menu_test.admin.config.development.menu-trail'] = array( + $links['menu_test.admin.config.development.menu-trail'] = array( 'link_title' => 'Menu trail - Case 2', 'description' => 'Tests menu_tree_set_path()', 'route_name' => 'menu_test.menu_trail_admin', 'parent' => 'system.admin.config.development', ); - $items['menu_test.custom-403-page'] = array( + $links['menu_test.custom-403-page'] = array( 'link_title' => 'Custom 403 page', 'route_name' => 'menu_test.custom_403', 'parent' => 'menu_test', ); - $items['menu_test.custom-404-page'] = array( + $links['menu_test.custom-404-page'] = array( 'link_title' => 'Custom 404 page', 'route_name' => 'menu_test.custom_404', 'parent' => 'menu_test', ); // Test the access key. - $items['menu_test.menu-title-test.case1'] = array( + $links['menu_test.menu-title-test.case1'] = array( 'link_title' => 'Example title - Case 1', 'route_name' => 'menu_test.title_test_case1', ); - $items['menu_test.menu-title-test.case2'] = array( + $links['menu_test.menu-title-test.case2'] = array( 'link_title' => 'Example title', 'route_name' => 'menu_test.title_test_case2', ); - $items['menu_test.menu-title-test.case3'] = array( + $links['menu_test.menu-title-test.case3'] = array( // Title gets completely ignored. Good thing, too. 'link_title' => 'Bike sheds full of blue smurfs', 'route_name' => 'menu_test.title_test_case3', ); - $items['menu_test.context'] = array( + $links['menu_test.context'] = array( 'link_title' => \Drupal::config('menu_test.menu_item')->get('title'), 'route_name' => 'menu_test.context', ); - return $items; + return $links; } /** diff --git a/core/modules/taxonomy/taxonomy.module b/core/modules/taxonomy/taxonomy.module index 85c022c..7240cb0 100644 --- a/core/modules/taxonomy/taxonomy.module +++ b/core/modules/taxonomy/taxonomy.module @@ -237,9 +237,9 @@ function taxonomy_theme() { * Implements hook_menu_link_defaults(). */ function taxonomy_menu_link_defaults() { - $links['taxonomy.admin.structure.vocabulary'] = array( + $links['taxonomy.vocabulary_list'] = array( 'link_title' => 'Taxonomy', - 'parent' => 'system.admin.structure', + 'parent' => 'system.admin_structure', 'description' => 'Manage tagging, categorization, and classification of your content.', 'route_name' => 'taxonomy.vocabulary_list', ); diff --git a/core/modules/tracker/tracker.module b/core/modules/tracker/tracker.module index 0e081e9..e1a749a 100644 --- a/core/modules/tracker/tracker.module +++ b/core/modules/tracker/tracker.module @@ -35,7 +35,7 @@ function tracker_help($path, $arg) { * Implements hook_menu_link_defaults(). */ function tracker_menu_link_defaults() { - $links['tracker'] = array( + $links['tracker.page'] = array( 'link_title' => 'Recent content', 'route_name' => 'tracker.page', ); diff --git a/core/modules/update/update.module b/core/modules/update/update.module index 23865ec..e846527 100644 --- a/core/modules/update/update.module +++ b/core/modules/update/update.module @@ -148,11 +148,11 @@ function update_page_build() { * Implements hook_menu_link_defaults(). */ function update_menu_link_defaults() { - $links['update.admin.reports.updates'] = array( + $links['update.status'] = array( 'link_title' => 'Available updates', 'description' => 'Get a status report about available updates for your installed modules and themes.', 'route_name' => 'update.status', - 'parent' => 'system.admin.reports', + 'parent' => 'system.admin_reports', 'weight' => -50, ); diff --git a/core/modules/user/user.module b/core/modules/user/user.module index ab9a163..d82378a 100644 --- a/core/modules/user/user.module +++ b/core/modules/user/user.module @@ -695,7 +695,7 @@ function theme_username($variables) { */ function user_menu_link_defaults() { // Registration and login pages. - $links['user'] = array( + $links['user.page'] = array( 'link_title' => 'My account', 'weight' => -10, 'route_name' => 'user.page', @@ -710,7 +710,7 @@ function user_menu_link_defaults() { ); // User listing pages. - $links['user.admin.people'] = array( + $links['user.admin_account'] = array( 'link_title' => 'People', 'route_name' => 'user.admin_account', 'description' => 'Manage user accounts, roles, and permissions.', @@ -719,18 +719,18 @@ function user_menu_link_defaults() { ); // Administration pages. - $links['user.admin.config.people'] = array( + $links['user.admin_index'] = array( 'link_title' => 'People', 'route_name' => 'user.admin_index', - 'parent' => 'system.admin.config', + 'parent' => 'system.admin_config', 'description' => 'Configure user accounts.', 'position' => 'left', 'weight' => -20, ); - $links['user.admin.config.people.accounts'] = array( + $links['user.account_settings'] = array( 'link_title' => 'Account settings', - 'parent' => 'user.admin.config.people', + 'parent' => 'user.admin_index', 'description' => 'Configure default behavior of users, including registration requirements, e-mails, and fields.', 'weight' => -10, 'route_name' => 'user.account_settings', @@ -747,7 +747,7 @@ function user_menu_link_presave(MenuLink $menu_link) { // for authenticated users. Authenticated users should see "My account", but // anonymous users should not see it at all. Therefore, invoke // user_menu_link_load() to conditionally hide the link. - if ($menu_link->machine_name == 'user' && $menu_link->module == 'system') { + if ($menu_link->machine_name == 'user.page' && $menu_link->module == 'system') { $menu_link->options['alter'] = TRUE; } } @@ -768,7 +768,7 @@ function user_menu_breadcrumb_alter(&$active_trail, $item) { */ function user_translated_menu_link_alter(MenuLink &$menu_link) { // Hide the "User account" link for anonymous users. - if ($menu_link->link_path == 'user' && $menu_link->module == 'system' && \Drupal::currentUser()->isAnonymous()) { + if ($menu_link->machine_name == 'user.page' && $menu_link->module == 'system' && \Drupal::currentUser()->isAnonymous()) { $menu_link->hidden = 1; } } diff --git a/core/modules/views_ui/views_ui.module b/core/modules/views_ui/views_ui.module index 7f140d3..00fb7eb 100644 --- a/core/modules/views_ui/views_ui.module +++ b/core/modules/views_ui/views_ui.module @@ -45,17 +45,17 @@ function views_ui_menu_link_defaults() { $links = array(); // Top-level Views module pages (not tied to a particular View). - $links['views_ui.admin.structure.views'] = array( + $links['views_ui.list'] = array( 'link_title' => 'Views', - 'parent' => 'system.admin.structure', + 'parent' => 'system.admin_structure', 'description' => 'Manage customized lists of content.', 'route_name' => 'views_ui.list', ); // A page in the Reports section to show usage of plugins in all views. - $links['views_ui.admin.reports.views-plugins'] = array( + $links['views_ui.reports_plugins'] = array( 'link_title' => 'Views plugins', - 'parent' => 'system.admin.reports', + 'parent' => 'system.admin_reports', 'description' => 'Overview of plugins used in all views.', 'route_name' => 'views_ui.reports_plugins', );