You are here

function build_hooks_toolbar_alter in Build Hooks 8.2

Same name and namespace in other branches
  1. 3.x build_hooks.module \build_hooks_toolbar_alter()

Implements hook_toolbar_alter().

File

./build_hooks.module, line 160
Contains build_hooks.module.

Code

function build_hooks_toolbar_alter(&$items) {

  // Not that great, but it works:
  // We add our own cache tag to the home element of the toolbar
  // which we can be sure is always there.
  $items['home']['#cache'] = [
    'tags' => [
      'config:frontend_environment_list',
      build_hooks_get_trigger_service()
        ->getToolbarCacheTag(),
    ],
  ];
}