function bartik_preprocess_block in Drupal 8
Same name and namespace in other branches
- 7 themes/bartik/template.php \bartik_preprocess_block()
- 9 core/themes/bartik/bartik.theme \bartik_preprocess_block()
Implements hook_preprocess_HOOK() for block.html.twig.
File
- core/
themes/ bartik/ bartik.theme, line 91 - Functions to support theming in the Bartik theme.
Code
function bartik_preprocess_block(&$variables) {
// Add a clearfix class to system branding blocks.
if ($variables['plugin_id'] == 'system_branding_block') {
$variables['attributes']['class'][] = 'clearfix';
}
}