function views_exposed_form_ajax_lookup_recursive

Recursively looks for the #ajax property for every form elemet.

Parameters

array $elements: The element array to look for #ajax property.

Return value

array Array of the elements names where #ajax was found.

1 call to views_exposed_form_ajax_lookup_recursive()
views_exposed_form_ajax_enable in ./views.module
Checks whether the exposed form will use AJAX.

File

./views.module, line 2283

Code

function views_exposed_form_ajax_lookup_recursive(array $elements) {
    $ajax_elements = array();
    foreach (element_children($elements) as $key) {
        if (!empty($elements[$key]['#name']) && !empty($elements[$key]['#ajax'])) {
            $ajax_elements[$elements[$key]['#name']] = $elements[$key]['#name'];
        }
        // Recursive call to look for #ajax in element's childrens.
        $ajax_elements += views_exposed_form_ajax_lookup_recursive($elements[$key]);
    }
    return $ajax_elements;
}