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

Breadcrumb

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

function ToolbarHooks::theme

Implements hook_theme().

File

core/modules/toolbar/src/Hook/ToolbarHooks.php, line 38

Class

ToolbarHooks
Hook implementations for toolbar.

Namespace

Drupal\toolbar\Hook

Code

public function theme($existing, $type, $theme, $path) : array {
    $items['toolbar'] = [
        'render element' => 'element',
    ];
    $items['menu__toolbar'] = [
        'base hook' => 'menu',
        'variables' => [
            'menu_name' => NULL,
            'items' => [],
            'attributes' => [],
        ],
    ];
    return $items;
}

API Navigation

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