Commit fa51d2e5 authored by alexpott's avatar alexpott
Browse files

Issue #2178725 by pwolanin, crowdcg, effulgentsia, Sutharsan: Make all core...

Issue #2178725 by pwolanin, crowdcg, effulgentsia, Sutharsan: Make all core menu link machine names and the corresponding route names match.
parent 81d8c4ab
......@@ -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;
......
......@@ -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',
......
......@@ -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;
......
......@@ -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',
);
......
......@@ -37,24 +37,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().
*/
......
......@@ -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?
......
......@@ -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.';
}
}
......
......@@ -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;
......
......@@ -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,
......
......@@ -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',
);
......
......@@ -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.';
}
/**
......
......@@ -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',
);
}
......
......@@ -44,8 +44,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).';
}
/**
......
......@@ -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;
......
......@@ -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;
......
......@@ -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',
);
......
......@@ -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;
}
/**
......
......@@ -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',
);
......
......@@ -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,
);
......
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment