function views_exposed_form_cache

Same name in other branches
  1. 7.x-3.x views.module \views_exposed_form_cache()

Save the Views exposed form for later use.

Parameters

$views_name: String. The views name.

$display_name: String. The current view display name.

$form_output: Array (optional). The form structure. Only needed when inserting the value.

Return value

Array. The form structure, if any. Otherwise, return FALSE.

1 call to views_exposed_form_cache()
views_exposed_form in ./views.module
Form builder for the exposed widgets form.

File

./views.module, line 1515

Code

function views_exposed_form_cache($views_name, $display_name, $form_output = NULL) {
    static $views_exposed;
    // Save the form output
    if (!empty($form_output)) {
        $views_exposed[$views_name][$display_name] = $form_output;
        return;
    }
    // Return the form output, if any
    return empty($views_exposed[$views_name][$display_name]) ? FALSE : $views_exposed[$views_name][$display_name];
}