function OliveroHooks::preprocessTextFormatWrapper
Same name and namespace in other branches
- main core/themes/olivero/src/Hook/OliveroHooks.php \Drupal\olivero\Hook\OliveroHooks::preprocessTextFormatWrapper()
Implements hook_preprocess_HOOK() for text-format-wrapper.
@todo Remove when https://www.drupal.org/node/3016343 is fixed.
Attributes
#[Hook('preprocess_text_format_wrapper')]
File
-
core/
themes/ olivero/ src/ Hook/ OliveroHooks.php, line 550
Class
- OliveroHooks
- Hook implementations for olivero.
Namespace
Drupal\olivero\HookCode
public function preprocessTextFormatWrapper(&$variables) : void {
$description_attributes = [];
if (!empty($variables['attributes']['id'])) {
$description_attributes['id'] = $variables['attributes']['aria-describedby'] = $variables['attributes']['id'];
unset($variables['attributes']['id']);
}
$variables['description_attributes'] = new Attribute($description_attributes);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.