1 entityreference.module _entityreference_field_settings_ajax_process_element(&$element, $main_form)

Helper function for custom ajax processing.

File

core/modules/entityreference/entityreference.module, line 475
Entityreference primary module file.

Code

function _entityreference_field_settings_ajax_process_element(&$element, $main_form) {
  if (isset($element['#ajax']) && $element['#ajax'] === TRUE) {
    $element['#ajax'] = array(
      'callback' => 'entityreference_settings_ajax',
      'wrapper' => $main_form['#id'],
      'element' => $main_form['#array_parents'],
    );
  }

  foreach (element_children($element) as $key) {
    _entityreference_field_settings_ajax_process_element($element[$key], $main_form);
  }
}