function OliveroPreRender::textFormat
Same name in other branches
- 9 core/themes/olivero/src/OliveroPreRender.php \Drupal\olivero\OliveroPreRender::textFormat()
- 11.x core/themes/olivero/src/OliveroPreRender.php \Drupal\olivero\OliveroPreRender::textFormat()
Prerender callback for text_format elements.
File
-
core/
themes/ olivero/ src/ OliveroPreRender.php, line 17
Class
- OliveroPreRender
- Implements trusted prerender callbacks for the Olivero theme.
Namespace
Drupal\oliveroCode
public static function textFormat($element) {
$element['format']['#attributes']['class'][] = 'filter-wrapper';
$element['format']['format']['#wrapper_attributes']['class'][] = 'form-item--editor-format';
$element['format']['format']['#attributes']['class'][] = 'filter-list';
$element['format']['format']['#attributes']['class'][] = 'form-element--small';
$element['format']['format']['#attributes']['class'][] = 'form-element--editor-format';
$element['format']['guidelines']['#attributes']['class'][] = 'filter-guidelines';
$element['format']['help']['#attributes']['class'][] = 'filter-help';
return $element;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.