function navigation_help
Same name in other branches
- 11.x core/modules/navigation/navigation.module \navigation_help()
Implements hook_help().
File
-
core/
modules/ navigation/ navigation.module, line 19
Code
function navigation_help($route_name, RouteMatchInterface $route_match) {
switch ($route_name) {
case 'help.page.navigation':
$output = '';
$output .= '<h3>' . t('About') . '</h3>';
$output .= '<p>' . t('The Navigation module provides a left-aligned, collapsible, vertical sidebar navigation.') . '</p>';
$output .= '<p>' . t('For more information, see the <a href=":docs">online documentation for the Navigation module</a>.', [
':docs' => 'https://www.drupal.org/project/navigation',
]) . '</p>';
return $output;
}
$configuration_route = 'layout_builder.navigation.';
if (!$route_match->getRouteObject()
->getOption('_layout_builder') || !str_starts_with($route_name, $configuration_route)) {
return layout_builder_help($route_name, $route_match);
}
if (str_starts_with($route_name, $configuration_route)) {
$output = '<p>' . t('This layout builder tool allows you to configure the blocks in the navigation toolbar.') . '</p>';
$output .= '<p>' . t('Forms and links inside the content of the layout builder tool have been disabled.') . '</p>';
return $output;
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.