You are here

function panels_edit_cache_settings_form in Panels 7.3

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

Cache settings form.

1 string reference to 'panels_edit_cache_settings_form'
panels_renderer_editor::ajax_cache_settings in plugins/display_renderers/panels_renderer_editor.class.php
AJAX entry point to configure the cache settings for a pane or the display.

File

plugins/display_renderers/panels_renderer_editor.class.php, line 1619
Class file to control the main Panels editor.

Code

function panels_edit_cache_settings_form($form, &$form_state) {
  ctools_form_include($form_state, 'plugins', 'panels');
  form_load_include($form_state, 'php', 'panels', '/plugins/display_renderers/panels_renderer_editor.class');
  $display =& $form_state['display'];
  $conf =& $form_state['conf'];
  $pid = $form_state['pid'];
  $info = panels_get_cache($conf['method']);
  $form['#action'] = $form_state['url'];
  $form['description'] = array(
    '#prefix' => '<div class="description">',
    '#suffix' => '</div>',
    '#value' => check_plain($info['description']),
  );
  $function = panels_plugin_get_function('cache', $conf['method'], 'settings form');
  $form['settings'] = $function($conf['settings'], $display, $pid);
  $form['settings']['#tree'] = TRUE;
  $form['display'] = array(
    '#type' => 'value',
    '#value' => $display,
  );
  $form['pid'] = array(
    '#type' => 'value',
    '#value' => $pid,
  );
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Save'),
  );
  return $form;
}