Commit 5efda012 authored by matio89's avatar matio89

correction not found route

parent 5e9e72ee
admin_toolbar_tools.help:
title: Tools
description: Admin toolbar tools
route_name: admin_toolbar_tools.help
weight: -15
parent: system.admin
system.admin_index:
title: Index
description: Admin toolbar tools
weight: -10
route_name: system.admin_index
parent: admin_toolbar_tools.help
admin_toolbar_tools.flush:
title: Flush all caches
route_name: admin_toolbar_tools.flush
......@@ -31,16 +19,6 @@ admin_toolbar_tools.flush_menu:
title: Menu
route_name: admin_toolbar_tools.flush_menu
parent: admin_toolbar_tools.flush
system.run_cron:
title: Run cron
weight: -8
route_name: system.run_cron
parent: admin_toolbar_tools.help
system.db_update:
title: Run Updates
weight: -6
route_name: system.db_update
parent: admin_toolbar_tools.help
admin_toolbar_tools.drupalorg:
title: Drupal.org
weight: -5
......@@ -60,77 +38,4 @@ admin_development:
title: Development
weight: -8
route_name: admin_development
parent: admin_toolbar_tools.help
#add menu to people
user.admin_create:
title: Add user
route_name: user.admin_create
parent: entity.user.collection
weight: -5
user.admin_permissions:
title: Permissions
route_name: user.admin_permissions
parent: entity.user.collection
weight: -4
user.admin_create:
title: Add user
route_name: user.admin_create
parent: entity.user.collection
weight: -3
entity.user_role.collection:
title: Roles
route_name: entity.user_role.collection
parent: entity.user.collection
weight: -2
node.add_page:
parent: system.admin_content
node.type_add:
title: Add content type
route_name: node.type_add
parent: entity.node_type.collection
weight: -5
entity.taxonomy_vocabulary.add_form:
title: Add vocabulary
route_name: entity.taxonomy_vocabulary.add_form
parent: entity.taxonomy_vocabulary.collection
weight: -5
entity.comment_type.add_form:
title: Add comment type
route_name: entity.comment_type.add_form
parent: entity.comment_type.collection
weight: -5
entity.menu.add_form:
title: Add menu
route_name: entity.menu.add_form
parent: entity.menu.collection
weight: -50
block_content.add_page:
title: Add custom block
route_name: block_content.add_page
parent: block.admin_display
weight: -5
entity.block_content.collection:
title: Custom block library
route_name: entity.block_content.collection
parent: block.admin_display
weight: -4
entity.block_content_type.collection:
title: Types
route_name: entity.block_content_type.collection
parent: block.admin_display
weight: -3
block_content.type_add:
title: Add
route_name: block_content.type_add
parent: entity.block_content_type.collection
weight: -5
contact.form_add:
title: Add contact form
route_name: contact.form_add
parent: entity.contact_form.collection
weight: -5
#links comments
comment.admin_approval:
title: Unapproved comments
route_name: comment.admin_approval
parent: comment.admin
\ No newline at end of file
parent: admin_toolbar_tools.help
\ No newline at end of file
......@@ -40,6 +40,141 @@ function admin_toolbar_tools_help($route_name, RouteMatchInterface $route_match)
*/
function admin_toolbar_tools_menu_links_discovered_alter(&$links) {
// If module system is enabled.
if(\Drupal::moduleHandler()->moduleExists('system')){
$links['system.run_cron'] = array(
'title' => 'Run cron',
'route_name' => 'system.run_cron',
'parent' => 'admin_toolbar_tools.help',
'weight' => -8
);
$links['system.db_update'] = array(
'title' => 'Run Updates',
'route_name' => 'system.db_update',
'parent' => 'admin_toolbar_tools.help',
'weight' => -6
);
$links['system.admin_index'] = array(
'title' => 'Index',
'route_name' => 'system.admin_index',
'parent' => 'admin_toolbar_tools.help',
'weight' => -10
);
$links['admin_toolbar_tools.help'] = array(
'title' => 'Tools',
'route_name' => 'admin_toolbar_tools.help',
'parent' => 'system.admin',
'weight' => -15
);
}
// If module user is enabled.
if(\Drupal::moduleHandler()->moduleExists('user')){
$links['user.admin_create'] = array(
'title' => 'Add user',
'route_name' => 'user.admin_create',
'parent' => 'entity.user.collection',
'weight' => -5
);
$links['user.admin_permissions'] = array(
'title' => 'Permissions',
'route_name' => 'user.admin_permissions',
'parent' => 'entity.user.collection',
'weight' => -4
);
$links['entity.user_role.collection'] = array(
'title' => 'Roles',
'route_name' => 'entity.user_role.collection',
'parent' => 'entity.user.collection',
'weight' => -2
);
$links['user.logoutt'] = array(
'title' => 'Logout',
'route_name' => 'user.logout',
'parent' => 'admin_toolbar_tools.help',
'weight' => -2
);
}
// If module node is enabled.
if(\Drupal::moduleHandler()->moduleExists('node')){
$links['node.add_page'] = array(
'title' => 'Add content type',
'route_name' => 'node.type_add',
'parent' => 'entity.node_type.collection',
'weight' => -5
);
}
// If module taxonomy is enabled.
if(\Drupal::moduleHandler()->moduleExists('taxonomy')){
$links['entity.taxonomy_vocabulary.add_form'] = array(
'title' => 'Add vocabulary',
'route_name' => 'entity.taxonomy_vocabulary.add_form',
'parent' => 'entity.taxonomy_vocabulary.collection',
'weight' => -5
);
}
// If module comment is enabled.
if(\Drupal::moduleHandler()->moduleExists('comment')){
$links['entity.comment_type.add_form'] = array(
'title' => 'Add comment type',
'route_name' => 'entity.comment_type.add_form',
'parent' => 'entity.comment_type.collection',
'weight' => -5
);
$links['comment.admin_approval'] = array(
'title' => 'Unapproved comments',
'route_name' => 'comment.admin_approval',
'parent' => 'comment.admin',
'weight' => -5
);
}
// If module menu_ui is enabled.
if(\Drupal::moduleHandler()->moduleExists('menu_ui')){
$links['entity.menu.add_form'] = array(
'title' => 'Add menu',
'route_name' => 'entity.menu.add_form',
'parent' => 'entity.menu.collection',
'weight' => -50
);
}
// If module block_content is enabled.
if(\Drupal::moduleHandler()->moduleExists('block_content')){
$links['block_content.add_page'] = array(
'title' => 'Add custom block',
'route_name' => 'block_content.add_page',
'parent' => 'block.admin_display',
'weight' => -5
);
$links['entity.block_content.collection'] = array(
'title' => 'Custom block library',
'route_name' => 'entity.block_content.collection',
'parent' => 'block.admin_display',
'weight' => -4
);
$links['entity.block_content_type.collection'] = array(
'title' => 'Types',
'route_name' => 'entity.block_content_type.collection',
'parent' => 'block.admin_display',
'weight' => -3
);
$links['block_content.type_add'] = array(
'title' => 'Add',
'route_name' => 'block_content.type_add',
'parent' => 'entity.block_content_type.collection',
'weight' => -5
);
}
// If module contact is enabled.
if(\Drupal::moduleHandler()->moduleExists('contact')){
$links['contact.form_add'] = array(
'title' => 'Add contact form',
'route_name' => 'contact.form_add',
'parent' => 'entity.contact_form.collection',
'weight' => -5
);
}
// If module update is enabled.
if(\Drupal::moduleHandler()->moduleExists('update')){
$links['update.module_update'] = array(
......
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