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

Breadcrumb

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

function ToolbarItem::getInfo

Overrides ElementInterface::getInfo

File

core/modules/toolbar/src/Element/ToolbarItem.php, line 20

Class

ToolbarItem
Provides a toolbar item that is wrapped in markup for common styling.

Namespace

Drupal\toolbar\Element

Code

public function getInfo() {
    $class = static::class;
    return [
        '#pre_render' => [
            [
                $class,
                'preRenderToolbarItem',
            ],
        ],
        'tab' => [
            '#type' => 'link',
            '#title' => '',
            '#url' => Url::fromRoute('<front>'),
        ],
    ];
}

API Navigation

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