1 views.module | views_exposed_form_cache($views_name, $display_name, $form_output = NULL) |
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.:
File
- core/
modules/ views/ views.module, line 1843 - Primarily Backdrop hooks and global API functions to manipulate views.
Code
function views_exposed_form_cache($views_name, $display_name, $form_output = NULL) {
// When running tests for exposed filters, this cache should
// be cleared between each test.
$views_exposed = &backdrop_static(__FUNCTION__);
// 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];
}