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

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.