public static function CshsElement::processElement in Client-side Hierarchical Select 8
Same name and namespace in other branches
- 8.3 src/Element/CshsElement.php \Drupal\cshs\Element\CshsElement::processElement()
- 8.2 src/Element/CshsElement.php \Drupal\cshs\Element\CshsElement::processElement()
File
- src/
Element/ CshsElement.php, line 54
Class
- CshsElement
- Defines the CSHS element.
Namespace
Drupal\cshs\ElementCode
public static function processElement(array $element) : array {
\assert(Inspector::assertAllStringable($element['#labels']));
$element['#attached']['library'][] = 'cshs/cshs.base';
$element['#attached']['drupalSettings'][static::ID][$element['#id']] = [
'labels' => $element['#labels'],
'noneLabel' => $element['#none_label'],
'noneValue' => $element['#none_value'],
];
static::setAttributes($element, [
'simpler-select-root',
'form-element',
'form-element--type-select',
]);
return $element;
}