function UmamiHooks::preprocessBlockBundleFooterPromoBlock

Same name and namespace in other branches
  1. 11.x core/profiles/demo_umami/themes/umami/src/Hook/UmamiHooks.php \Drupal\umami\Hook\UmamiHooks::preprocessBlockBundleFooterPromoBlock()

Implements hook_preprocess_HOOK() for block bundle footer promo.

Attributes

#[Hook('preprocess_block__bundle__footer_promo_block')]

File

core/profiles/demo_umami/themes/umami/src/Hook/UmamiHooks.php, line 94

Class

UmamiHooks
Hook implementations for umami.

Namespace

Drupal\umami\Hook

Code

public function preprocessBlockBundleFooterPromoBlock(&$variables) : void {
  if (isset($variables['content']['field_content_link'])) {
    foreach (Element::children($variables['content']['field_content_link']) as $key) {
      $variables['content']['field_content_link'][$key]['#attributes']['class'][] = 'footer-block__link';
    }
  }
}

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