function HelpThemeHooks::preprocessBlock

Implements hook_preprocess_HOOK() for block templates.

Attributes

#[Hook('preprocess_block')]

File

core/modules/help/src/Hook/HelpThemeHooks.php, line 18

Class

HelpThemeHooks
Hook implementations for help.

Namespace

Drupal\help\Hook

Code

public function preprocessBlock(&$variables) : void {
  if ($variables['plugin_id'] == 'help_block') {
    $variables['attributes']['role'] = 'complementary';
  }
}

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