Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
WCMS
uw_sites_all
Commits
88b1a37e
Commit
88b1a37e
authored
Jan 24, 2022
by
Eric Bremner
Browse files
ISTWCMS-5307: adding menu link for projects to install and update hooks
parent
7a94a97c
Changes
1
Hide whitespace changes
Inline
Side-by-side
uw_sites_all.install
View file @
88b1a37e
...
...
@@ -68,6 +68,13 @@ function uw_sites_all_install() {
function
_uw_sites_all_get_menu_items
():
array
{
return
[
'Projects'
=>
[
'title'
=>
'Projects'
,
'menu_name'
=>
'main'
,
'route_name'
=>
'uw_ct_project.listing'
,
'weight'
=>
30
,
'enabled'
=>
FALSE
,
],
'Opportunities'
=>
[
'title'
=>
'Opportunities'
,
'menu_name'
=>
'main'
,
...
...
@@ -601,4 +608,17 @@ function uw_sites_all_update_9107(&$sandbox) {
$roles
[
'uw_role_site_manager'
]
->
save
();
$roles
[
'uw_role_content_editor'
]
->
save
();
$roles
[
'uw_role_content_author'
]
->
save
();
// Create the URL from the route name.
$url
=
URL
::
fromRoute
(
'uw_ct_project.listing'
)
->
toString
();
// Create the actual menu link.
MenuLinkContent
::
create
([
'title'
=>
'Projects'
,
'link'
=>
[
'uri'
=>
'internal:'
.
$url
],
'menu_name'
=>
'main'
,
'weight'
=>
30
,
'enabled'
=>
FALSE
,
])
->
save
();
}
Write
Preview
Supports
Markdown
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