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;
}

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