You are here

function admin_toolbar_tools_preprocess_html in Admin Toolbar 8.2

Same name and namespace in other branches
  1. 3.x admin_toolbar_tools/admin_toolbar_tools.module \admin_toolbar_tools_preprocess_html()

Implements hook_preprocess_html().

File

admin_toolbar_tools/admin_toolbar_tools.module, line 33
Provides extra menu links for the core drupal toolbar.

Code

function admin_toolbar_tools_preprocess_html(&$variables) {
  if (\Drupal::currentUser()
    ->hasPermission('access toolbar')) {
    $variables['attributes']['class'][] = 'toolbar-icon-' . intval(\Drupal::VERSION);
  }
}