public static function WebformButtons::processRadios in Webform 6.x
Same name and namespace in other branches
- 8.5 modules/webform_jqueryui_buttons/src/Element/WebformButtons.php \Drupal\webform_jqueryui_buttons\Element\WebformButtons::processRadios()
Expands a radios element into individual radio elements.
Overrides Radios::processRadios
File
- modules/
webform_jqueryui_buttons/ src/ Element/ WebformButtons.php, line 18
Class
- WebformButtons
- Provides a webform element for buttons.
Namespace
Drupal\webform_jqueryui_buttons\ElementCode
public static function processRadios(&$element, FormStateInterface $form_state, &$complete_form) {
$element = parent::processRadios($element, $form_state, $complete_form);
$element['#attributes']['class'][] = 'js-webform-buttons';
$element['#attributes']['class'][] = 'webform-buttons';
$element['#options_display'] = 'side_by_side';
$element['#attached']['library'][] = 'webform_jqueryui_buttons/webform_jqueryui_buttons.element';
return $element;
}