function toolbar_anti_flicker_toolbar in Toolbar Anti-flicker 8.3
Same name and namespace in other branches
- 9.3.x toolbar_anti_flicker.module \toolbar_anti_flicker_toolbar()
File
- ./
toolbar_anti_flicker.module, line 156
Code
function toolbar_anti_flicker_toolbar() {
$items['anti-flicker'] = [
'#type' => 'toolbar_item',
'tab' => [
'#type' => 'link',
'#title' => t(' '),
'#url' => Url::fromRoute('<front>'),
],
'tray' => [
'#heading' => t(' '),
'#wrapper_attributes' => [
'id' => 'toolbar-tray-anti-flicker',
],
'content' => [
'#theme' => 'item_list',
'#items' => [
\Drupal\Core\Link::fromTextAndUrl(' ', new Url('<front>', [], [])),
],
'#attributes' => [
'class' => [
'toolbar-menu',
],
],
],
],
'#weight' => 1000,
];
return $items;
}