function build_hooks_toolbar_alter in Build Hooks 3.x
Same name and namespace in other branches
- 8.2 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(),
],
];
}