function ClaroHooks::preprocessAdminBlock

Same name and namespace in other branches
  1. 11.x core/themes/claro/src/Hook/ClaroHooks.php \Drupal\claro\Hook\ClaroHooks::preprocessAdminBlock()

Implements hook_preprocess_HOOK() for admin_block.

Attributes

#[Hook('preprocess_admin_block')]

File

core/themes/claro/src/Hook/ClaroHooks.php, line 203

Class

ClaroHooks
Hook implementations for claro.

Namespace

Drupal\claro\Hook

Code

public function preprocessAdminBlock(&$variables) : void {
  if (!empty($variables['block']['content'])) {
    $variables['block']['content']['#attributes']['class'][] = 'admin-list--panel';
  }
}

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