You are here

function bartik_preprocess_block in Drupal 9

Same name and namespace in other branches
  1. 8 core/themes/bartik/bartik.theme \bartik_preprocess_block()
  2. 7 themes/bartik/template.php \bartik_preprocess_block()
  3. 10 core/themes/bartik/bartik.theme \bartik_preprocess_block()

Implements hook_preprocess_HOOK() for block.html.twig.

File

core/themes/bartik/bartik.theme, line 93
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';
  }
}