You are here

public static function Select2::preRenderDateCombo in Select2 ALL THE THINGS! 8

Render API callback: Apply Select2 to a date_combo element.

Parameters

array $element: The element.

Return value

array The element.

File

src/Select2.php, line 129

Class

Select2
Methods for adding Select2 to render elements.

Namespace

Drupal\select2_all

Code

public static function preRenderDateCombo(array $element) {

  // Because the date_combo field contains many different select elements, we
  // need to recurse down and apply the FAPI property to each one.
  if (isset($element['#select2'])) {
    static::elementApplyPropertyRecursive($element, $element['#select2']);
  }
  return $element;
}