function panels_ajax_cache_settings in Panels 5.2
Same name and namespace in other branches
- 6.2 includes/display-edit.inc \panels_ajax_cache_settings()
Handle the cache settings form
1 call to panels_ajax_cache_settings()
- panels_ajax_cache in includes/
display_edit.inc - Entry point for AJAX modal: configure pane
1 string reference to 'panels_ajax_cache_settings'
- panels_menu in ./
panels.module - Implementation of hook_menu
File
- includes/
display_edit.inc, line 1265
Code
function panels_ajax_cache_settings($cache, $pid, $method = NULL) {
if (empty($method) && isset($_POST['method'])) {
// Retrieve the method from the form.
$method = $_POST['method'];
}
if (empty($method) || !($function = panels_plugin_get_function('cache', $method, 'settings form'))) {
panels_ajax_set_cache_data($cache->display, $pid, 0);
}
else {
$cache->display = panels_ajax_form('panels_edit_cache_settings_form', t('Configure cache settings'), url($_GET['q'], NULL, NULL, TRUE), $cache->display, $pid, $method, $function);
}
panels_cache_set($cache->display->did, $cache);
if ($pid) {
$ajax_vars = new stdClass();
list($ajax_vars->id, $ajax_vars->output, $ajax_vars->type) = array(
$pid,
'Changed',
'dismiss-changed',
);
panels_ajax_render($ajax_vars);
}
else {
panels_ajax_render('dismiss');
}
}