function varbase_toolbar_alter in Varbase: The Ultimate Drupal CMS Starter Kit (Bootstrap Ready) 8.7
Same name and namespace in other branches
- 8.8 varbase.profile \varbase_toolbar_alter()
- 8.4 varbase.profile \varbase_toolbar_alter()
- 8.5 varbase.profile \varbase_toolbar_alter()
- 8.6 varbase.profile \varbase_toolbar_alter()
- 9.0.x varbase.profile \varbase_toolbar_alter()
Implements hook_toolbar_alter().
File
- ./
varbase.profile, line 533 - Enables modules and site configuration for a Varbase site installation.
Code
function varbase_toolbar_alter(&$items) {
if (\Drupal::currentUser()
->hasPermission('access toolbar') && !empty($items['admin_toolbar_tools'])) {
$items['admin_toolbar_tools']['#attached']['library'][] = 'varbase/toolbar.icon';
}
}