function OliveroHooks::preprocessSelect
Same name and namespace in other branches
- main core/themes/olivero/src/Hook/OliveroHooks.php \Drupal\olivero\Hook\OliveroHooks::preprocessSelect()
Implements hook_preprocess_HOOK() for select.
Attributes
#[Hook('preprocess_select')]
File
-
core/
themes/ olivero/ src/ Hook/ OliveroHooks.php, line 305
Class
- OliveroHooks
- Hook implementations for olivero.
Namespace
Drupal\olivero\HookCode
public function preprocessSelect(&$variables) : void {
$variables['attributes']['class'][] = 'form-element';
$variables['attributes']['class'][] = $variables['element']['#multiple'] ? 'form-element--type-select-multiple' : 'form-element--type-select';
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.