function UserLazyBuilder::renderNavigationLinks

Same name in other branches
  1. 10 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 37

Class

UserLazyBuilder
User navigation block lazy builder.

Namespace

Drupal\navigation

Code

public function renderNavigationLinks() {
    return [
        '#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.