You are here

public static function ChosenFormRender::preRenderDateCombo in Chosen 8.2

Same name and namespace in other branches
  1. 3.0.x src/ChosenFormRender.php \Drupal\chosen\ChosenFormRender::preRenderDateCombo()

Render API callback: Apply Chosen to a date_combo element.

Parameters

array $element: The element.

Return value

array The element.

File

src/ChosenFormRender.php, line 114

Class

ChosenFormRender

Namespace

Drupal\chosen

Code

public static function preRenderDateCombo($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['#chosen'])) {
    chosen_element_apply_property_recursive($element, $element['#chosen']);
  }
  return $element;
}