You are here

function panels_edit_cache_settings_form in Panels 5.2

Same name and namespace in other branches
  1. 6.3 plugins/display_renderers/panels_renderer_editor.class.php \panels_edit_cache_settings_form()
  2. 6.2 includes/display-edit.inc \panels_edit_cache_settings_form()
  3. 7.3 plugins/display_renderers/panels_renderer_editor.class.php \panels_edit_cache_settings_form()

Cache settings form

2 string references to 'panels_edit_cache_settings_form'
panels_ajax_cache in includes/display_edit.inc
Entry point for AJAX modal: configure pane
panels_ajax_cache_settings in includes/display_edit.inc
Handle the cache settings form

File

includes/display_edit.inc, line 1313

Code

function panels_edit_cache_settings_form($display, $pid, $method, $settings_function) {
  $conf = $pid ? $display->content[$pid]->cache : $display->cache;
  $info = panels_get_cache($method);
  $form['description'] = array(
    '#prefix' => '<div class="description">',
    '#suffix' => '</div>',
    '#value' => check_plain($info['description']),
  );
  $form['settings'] = $settings_function($conf['settings'], $display, $pid);
  $form['settings']['#tree'] = TRUE;
  $form['method'] = array(
    '#type' => 'hidden',
    '#value' => $method,
  );
  $form['display'] = array(
    '#type' => 'value',
    '#value' => $display,
  );
  $form['pid'] = array(
    '#type' => 'value',
    '#value' => $pid,
  );
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Save'),
  );
  return $form;
}