You are here

function admin_toolbar_tools_toolbar in Admin Toolbar 8.2

Same name and namespace in other branches
  1. 8 admin_toolbar_tools/admin_toolbar_tools.module \admin_toolbar_tools_toolbar()
  2. 3.x admin_toolbar_tools/admin_toolbar_tools.module \admin_toolbar_tools_toolbar()

Implements hook_toolbar().

File

admin_toolbar_tools/admin_toolbar_tools.module, line 15
Provides extra menu links for the core drupal toolbar.

Code

function admin_toolbar_tools_toolbar() {
  $items = [];
  $items['admin_toolbar_tools'] = [
    '#type' => 'toolbar_item',
    'tab' => [
      '#type' => 'link',
      '#attributes' => [
        'class' => [
          'toolbar-icon',
          'toolbar-icon-admin-toolbar-tools-help',
        ],
      ],
    ],
    '#attached' => [
      'library' => [
        'admin_toolbar_tools/toolbar.icon',
      ],
    ],
  ];
  return $items;
}