WebformFlexbox.php in Webform 8.5
File
src/Element/WebformFlexbox.php
View source
<?php
namespace Drupal\webform\Element;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Render\Element\Container;
class WebformFlexbox extends Container {
public static function processContainer(&$element, FormStateInterface $form_state, &$complete_form) {
$element = parent::processContainer($element, $form_state, $complete_form);
$element['#attributes']['class'][] = 'webform-flexbox';
$element['#attributes']['class'][] = 'js-webform-flexbox';
if (isset($element['#align_items'])) {
$element['#attributes']['class'][] = 'webform-flexbox--' . $element['#align_items'];
}
$element['#attributes']['class'][] = 'js-form-wrapper';
$element['#attached']['library'][] = 'webform/webform.element.flexbox';
return $element;
}
}