function LanguageThemeHooks::preprocessBlock
Same name and namespace in other branches
- 11.x core/modules/language/src/Hook/LanguageThemeHooks.php \Drupal\language\Hook\LanguageThemeHooks::preprocessBlock()
Implements hook_preprocess_HOOK() for block templates.
Attributes
#[Hook('preprocess_block')]
File
-
core/
modules/ language/ src/ Hook/ LanguageThemeHooks.php, line 176
Class
- LanguageThemeHooks
- Hook implementations for language.
Namespace
Drupal\language\HookCode
public function preprocessBlock(&$variables) : void {
if ($variables['configuration']['provider'] == 'language') {
$variables['attributes']['role'] = 'navigation';
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.