function PreprocessHooks::adminBlock
Same name and namespace in other branches
- 11.x core/themes/admin/src/Hook/PreprocessHooks.php \Drupal\admin\Hook\PreprocessHooks::adminBlock()
Implements hook_preprocess_HOOK() for admin_block.
Attributes
#[Hook('preprocess_admin_block')]
File
-
core/
themes/ admin/ src/ Hook/ PreprocessHooks.php, line 93
Class
- PreprocessHooks
- Provides preprocess implementations.
Namespace
Drupal\admin\HookCode
public function adminBlock(array &$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.