function chosen_element_info_alter in Chosen 8.2
Same name and namespace in other branches
- 7.3 chosen.module \chosen_element_info_alter()
- 7.2 chosen.module \chosen_element_info_alter()
- 3.0.x chosen.module \chosen_element_info_alter()
Implements hook_element_info_alter().
File
- ./
chosen.module, line 26 - General functions and hook implementations.
Code
function chosen_element_info_alter(&$info) {
$info['select']['#pre_render'][] = '\\Drupal\\chosen\\ChosenFormRender::preRenderSelect';
if (\Drupal::moduleHandler()
->moduleExists('date')) {
$info['date_combo']['#pre_render'][] = '\\Drupal\\chosen\\ChosenFormRender::preRenderDateCombo';
}
if (\Drupal::moduleHandler()
->moduleExists('select_or_other')) {
$info['select_or_other']['#pre_render'][] = '\\Drupal\\chosen\\ChosenFormRender::preRenderSelectOther';
}
if (\Drupal::moduleHandler()
->moduleExists('synonyms')) {
$info['synonyms_entity_select']['#pre_render'][] = '\\Drupal\\chosen\\ChosenFormRender::preRenderSelect';
}
}