function hook_navigation_content_top
Provide content for Navigation content_top section.
Return value
array An associative array of renderable elements.
See also
hook_navigation_content_top_alter()
Related topics
3 functions implement hook_navigation_content_top()
Note: the procedural functions in this list are found by pattern matching, so the list may include some functions that are not actually implementations of this hook.
- DemoUmamiHooks::navigationContentTop in core/
profiles/ demo_umami/ src/ Hook/ DemoUmamiHooks.php - Implements hook_navigation_content_top().
- NavigationHooks::navigationWorkspaces in core/
modules/ navigation/ src/ Hook/ NavigationHooks.php - Implements hook_navigation_content_top().
- NavigationTestHooks::navigationContentTop in core/
modules/ navigation/ tests/ navigation_test/ src/ Hook/ NavigationTestHooks.php - Implements hook_navigation_content_top().
1 invocation of hook_navigation_content_top()
- NavigationRenderer::getContentTop in core/
modules/ navigation/ src/ NavigationRenderer.php - Gets the content for content_top section.
File
-
core/
modules/ navigation/ navigation.api.php, line 21
Code
function hook_navigation_content_top() : array {
return [
'navigation_foo' => [
'#markup' => \Drupal::config('system.site')->get('name'),
'#cache' => [
'tags' => [
'config:system.site',
],
],
],
'navigation_bar' => [
'#markup' => 'bar',
],
'navigation_baz' => [
'#markup' => 'baz',
],
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.