Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
A
admin_toolbar
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
admin_toolbar
Commits
0b26cb8c
Commit
0b26cb8c
authored
May 23, 2016
by
romainj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changes Devel menu item titles
parent
3c6fe339
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
20 deletions
+33
-20
admin_toolbar_tools/admin_toolbar_tools.module
admin_toolbar_tools/admin_toolbar_tools.module
+33
-20
No files found.
admin_toolbar_tools/admin_toolbar_tools.module
View file @
0b26cb8c
...
...
@@ -79,7 +79,8 @@ function admin_toolbar_tools_menu_links_discovered_alter(&$links) {
'route_name'
=>
'system.modules_uninstall'
,
'parent'
=>
'system.modules_list'
,
);
// Defining the machine names for all core content entities.
// Defines the machine names for all core content entities.
$content_entities
=
array
(
"block_content"
=>
array
(
"content_entity"
=>
"block_content"
,
...
...
@@ -159,9 +160,10 @@ function admin_toolbar_tools_menu_links_discovered_alter(&$links) {
}
}
}
// Add user links.
$links
[
'user.admin_create'
]
=
array
(
'title'
=>
t
(
'Add user'
),
'title'
=>
t
(
'Add
a new
user'
),
'route_name'
=>
'user.admin_create'
,
'parent'
=>
'entity.user.collection'
,
);
...
...
@@ -182,7 +184,7 @@ function admin_toolbar_tools_menu_links_discovered_alter(&$links) {
'weight'
=>
10
,
);
$links
[
'user.role_add'
]
=
array
(
'title'
=>
t
(
'Add role'
),
'title'
=>
t
(
'Add
a new
role'
),
'route_name'
=>
'user.role_add'
,
'parent'
=>
'entity.user_role.collection'
,
'weight'
=>
-
5
,
...
...
@@ -262,6 +264,7 @@ function admin_toolbar_tools_menu_links_discovered_alter(&$links) {
'parent'
=>
'entity.entity_view_mode.collection'
,
);
}
if
(
$moduleHandler
->
moduleExists
(
'taxonomy'
))
{
$links
[
'entity.taxonomy_vocabulary.add_form'
]
=
array
(
'title'
=>
t
(
'Add vocabulary'
),
...
...
@@ -278,6 +281,7 @@ function admin_toolbar_tools_menu_links_discovered_alter(&$links) {
);
}
}
if
(
$moduleHandler
->
moduleExists
(
'menu_ui'
))
{
$links
[
'entity.menu.add_form'
]
=
array
(
'title'
=>
t
(
'Add menu'
),
...
...
@@ -285,7 +289,7 @@ function admin_toolbar_tools_menu_links_discovered_alter(&$links) {
'parent'
=>
'entity.menu.collection'
,
'weight'
=>
-
50
);
// Add
ing
links to /admin/structure/menu.
// Add
s
links to /admin/structure/menu.
foreach
(
menu_ui_get_menus
()
as
$machine_name
=>
$label
)
{
$links
[
'entity.menu.edit_form.'
.
$machine_name
]
=
array
(
'title'
=>
$label
,
...
...
@@ -315,6 +319,7 @@ function admin_toolbar_tools_menu_links_discovered_alter(&$links) {
);
}
}
// If module block_content is enabled.
if
(
$moduleHandler
->
moduleExists
(
'block_content'
))
{
$links
[
'block_content.add_page'
]
=
array
(
...
...
@@ -334,6 +339,7 @@ function admin_toolbar_tools_menu_links_discovered_alter(&$links) {
'parent'
=>
'block.admin_display'
,
);
}
// If module Contact is enabled.
if
(
$moduleHandler
->
moduleExists
(
'contact'
))
{
$links
[
'contact.form_add'
]
=
array
(
...
...
@@ -343,7 +349,8 @@ function admin_toolbar_tools_menu_links_discovered_alter(&$links) {
'weight'
=>
-
5
);
}
// If module Update is enabled.
// If module Update Manager is enabled.
if
(
$moduleHandler
->
moduleExists
(
'update'
))
{
$links
[
'update.module_update'
]
=
array
(
'title'
=>
t
(
'Update'
),
...
...
@@ -356,65 +363,69 @@ function admin_toolbar_tools_menu_links_discovered_alter(&$links) {
'parent'
=>
'system.modules_list'
,
);
}
// If module Devel is enabled.
if
(
$moduleHandler
->
moduleExists
(
'devel'
))
{
$links
[
'admin_development'
]
=
array
(
'title'
=>
t
(
'Development'
),
'route_name'
=>
'system.admin_config_development'
,
'parent'
=>
'admin_toolbar_tools.help'
,
'weight'
=>
-
8
'weight'
=>
'-8'
,
);
$links
[
'devel.admin_settings'
]
=
array
(
'title'
=>
t
(
'Devel settings'
),
'route_name'
=>
'devel.admin_settings'
,
'parent'
=>
'admin_development'
'parent'
=>
'admin_development'
,
'weight'
=>
'-1'
,
);
$links
[
'devel.configs_list'
]
=
array
(
'title'
=>
t
(
'Config editor'
),
'route_name'
=>
'devel.configs_list'
,
'parent'
=>
'admin_development'
'parent'
=>
'admin_development'
,
);
$links
[
'devel.reinstall'
]
=
array
(
'title'
=>
t
(
'Reinstall modules'
),
'route_name'
=>
'devel.reinstall'
,
'parent'
=>
'admin_development'
'parent'
=>
'admin_development'
,
);
$links
[
'devel.menu_rebuild'
]
=
array
(
'title'
=>
t
(
'Rebuild menu'
),
'route_name'
=>
'devel.menu_rebuild'
,
'parent'
=>
'admin_development'
'parent'
=>
'admin_development'
,
);
$links
[
'devel.state_system_page'
]
=
array
(
'title'
=>
t
(
'State editor'
),
'route_name'
=>
'devel.state_system_page'
,
'parent'
=>
'admin_development'
'parent'
=>
'admin_development'
,
);
$links
[
'devel.theme_registry'
]
=
array
(
'title'
=>
t
(
'Theme registry'
),
'route_name'
=>
'devel.theme_registry'
,
'parent'
=>
'admin_development'
'parent'
=>
'admin_development'
,
);
$links
[
'devel.entity_info_page'
]
=
array
(
'title'
=>
t
(
'Entity Info'
),
'route_name'
=>
'devel.entity_info_page'
,
'parent'
=>
'admin_development'
'parent'
=>
'admin_development'
,
);
$links
[
'devel.execute_php'
]
=
array
(
'title'
=>
t
(
'Execute PHP'
),
'title'
=>
t
(
'Execute PHP
Code
'
),
'route_name'
=>
'devel.execute_php'
,
'parent'
=>
'admin_development'
'parent'
=>
'admin_development'
,
);
$links
[
'devel.session'
]
=
array
(
'title'
=>
t
(
'
View session
'
),
'title'
=>
t
(
'
Session viewer
'
),
'route_name'
=>
'devel.session'
,
'parent'
=>
'admin_development'
'parent'
=>
'admin_development'
,
);
$links
[
'devel.elements_page'
]
=
array
(
'title'
=>
t
(
'
Hook_element
s'
),
'title'
=>
t
(
'
Form API field type
s'
),
'route_name'
=>
'devel.elements_page'
,
'parent'
=>
'admin_development'
'parent'
=>
'admin_development'
,
);
}
// If module views_ui enabled.
// If module Views Ui enabled.
if
(
$moduleHandler
->
moduleExists
(
'views_ui'
))
{
$links
[
'views_ui.add'
]
=
array
(
'title'
=>
t
(
'Add new view'
),
...
...
@@ -423,11 +434,13 @@ function admin_toolbar_tools_menu_links_discovered_alter(&$links) {
'weight'
=>
-
5
,
);
}
$links
[
'system.theme_settings_'
]
=
array
(
'title'
=>
t
(
'Settings'
),
'route_name'
=>
'system.theme_settings'
,
'parent'
=>
'system.themes_page'
,
);
if
(
$moduleHandler
->
moduleExists
(
'update'
))
{
$links
[
'update.theme_install_'
]
=
array
(
'title'
=>
t
(
'Install new theme'
),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment