class ToolbarThemeHooks

Hook implementations for toolbar.

Hierarchy

Expanded class hierarchy of ToolbarThemeHooks

File

core/modules/toolbar/src/Hook/ToolbarThemeHooks.php, line 10

Namespace

Drupal\toolbar\Hook
View source
class ToolbarThemeHooks {
  
  /**
   * Implements hook_preprocess_HOOK() for HTML document templates.
   */
  public function preprocessHtml(&$variables) : void {
    if (!\Drupal::currentUser()->hasPermission('access toolbar')) {
      return;
    }
    $variables['attributes']['class'][] = 'toolbar-loading';
  }

}

Members

Title Sort descending Modifiers Object type Summary
ToolbarThemeHooks::preprocessHtml public function Implements hook_preprocess_HOOK() for HTML document templates.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.