function 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.