You are here

function _entityreference_field_settings_ajax_process_element in Entity reference 8

Same name and namespace in other branches
  1. 7 entityreference.module \_entityreference_field_settings_ajax_process_element()
1 call to _entityreference_field_settings_ajax_process_element()
_entityreference_field_settings_ajax_process in ./entityreference.module

File

./entityreference.module, line 266
Provides a field that can reference other entities.

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);
  }
}