function _siteimprove_toolbar_basic in Siteimprove 8
Basic toolbar array.
Return value
array[]
1 call to _siteimprove_toolbar_basic()
- siteimprove_toolbar in ./
siteimprove.module - Implements hook_toolbar().
File
- ./
siteimprove.module, line 147 - Drupal module: Siteimprove Plugin.
Code
function _siteimprove_toolbar_basic() {
return [
'siteimprove_toolbar' => [
'#weight' => 500,
'#attached' => [
'library' => 'siteimprove/siteimprove.toolbar',
],
'#cache' => [
'contexts' => [
'user.permissions',
'url.path',
],
'tags' => [
'siteimprove_toolbar',
],
],
'#type' => 'toolbar_item',
'tab' => [
'#type' => 'link',
'#title' => 'Siteimprove',
'#url' => Url::fromUserInput('#'),
'#attributes' => [
'class' => [
'siteimprove-link',
],
],
],
'#wrapper_attributes' => [
'class' => [
'siteimprove-toolbar',
],
],
'tray' => [
'#heading' => 'Siteimprove',
'actions' => [
'#theme' => 'item_list',
'#items' => [],
'#attributes' => [
'class' => [
'toolbar-menu',
],
],
],
'urls' => [],
'empty' => [],
],
],
];
}