function UserLazyBuilder::renderNavigationLinks

Same name in other branches
  1. 11.x core/modules/navigation/src/UserLazyBuilder.php \Drupal\navigation\UserLazyBuilder::renderNavigationLinks()

Lazy builder callback for rendering navigation links.

Return value

array A renderable array as expected by the renderer service.

File

core/modules/navigation/src/UserLazyBuilder.php, line 41

Class

UserLazyBuilder
User navigation block lazy builder.

Namespace

Drupal\navigation

Code

public function renderNavigationLinks() {
    return [
        '#help' => $this->moduleHandler
            ->moduleExists('help'),
        '#theme' => 'menu_region__footer',
        '#items' => $this->userOperationLinks(),
        '#menu_name' => 'user',
        '#title' => $this->account
            ->getDisplayName(),
        '#cache' => [
            'contexts' => [
                'user',
            ],
        ],
    ];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.