public static function Select2::preRenderSelectOrOther in Select2 ALL THE THINGS! 8
Render API callback: Apply Select2 to a select_or_other element.
Parameters
array $element: The element.
Return value
array The element.
File
- src/
Select2.php, line 147
Class
- Select2
- Methods for adding Select2 to render elements.
Namespace
Drupal\select2_allCode
public static function preRenderSelectOrOther(array $element) {
if ($element['#select_type'] === 'select' && isset($element['#select2'])) {
$element['select']['#select2'] = $element['#select2'];
}
return $element;
}