Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. TopBar.php

function TopBar::getInfo

Overrides ElementInterface::getInfo

File

core/modules/navigation/src/Element/TopBar.php, line 21

Class

TopBar
Provides a render element for the default Drupal toolbar.

Namespace

Drupal\navigation\Element

Code

public function getInfo() : array {
    $class = static::class;
    return [
        '#pre_render' => [
            [
                $class,
                'preRenderTopBar',
            ],
        ],
        '#theme' => 'top_bar',
        '#attached' => [
            'library' => [
                'navigation/internal.navigation',
            ],
        ],
    ];
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal