Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
project
drupal
Commits
fcb24f94
Commit
fcb24f94
authored
Aug 13, 2013
by
catch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue
#1618458
by Cottser, Jody Lynn, grndlvl: Fixed help_menu() creates unnecessary router items.
parent
21d59b50
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
11 deletions
+11
-11
core/modules/help/help.module
core/modules/help/help.module
+4
-9
core/modules/help/lib/Drupal/help/Controller/HelpController.php
...odules/help/lib/Drupal/help/Controller/HelpController.php
+7
-2
No files found.
core/modules/help/help.module
View file @
fcb24f94
...
...
@@ -16,15 +16,10 @@ function help_menu() {
'weight'
=>
9
,
);
$modules
=
Drupal
::
moduleHandler
()
->
getImplementations
(
'help'
);
ksort
(
$modules
);
foreach
(
$modules
as
$module
)
{
$items
[
'admin/help/'
.
$module
]
=
array
(
'title'
=>
$module
,
'route_name'
=>
'help_page'
,
'type'
=>
MENU_VISIBLE_IN_BREADCRUMB
,
);
}
$items
[
'admin/help/%'
]
=
array
(
'route_name'
=>
'help_page'
,
'type'
=>
MENU_VISIBLE_IN_BREADCRUMB
,
);
return
$items
;
}
...
...
core/modules/help/lib/Drupal/help/Controller/HelpController.php
View file @
fcb24f94
...
...
@@ -9,6 +9,7 @@
use
Drupal\Core\Controller\ControllerInterface
;
use
Drupal\Core\Extension\ModuleHandlerInterface
;
use
Symfony\Component\DependencyInjection\ContainerInterface
;
use
Symfony\Component\HttpKernel\Exception\NotFoundHttpException
;
/**
* Controller routines for help routes.
...
...
@@ -98,6 +99,8 @@ protected function helpLinksAsList() {
*
* @return array
* A render array as expected by drupal_render().
*
* @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException
*/
public
function
helpPage
(
$name
)
{
$build
=
array
();
...
...
@@ -132,9 +135,11 @@ public function helpPage($name) {
'#links'
=>
$links
,
);
}
return
$build
;
}
else
{
throw
new
NotFoundHttpException
();
}
return
$build
;
}
}
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