You are here

function panels_simple_cache_settings_form in Panels 6.2

Same name and namespace in other branches
  1. 5.2 panels_simple_cache/panels_simple_cache.module \panels_simple_cache_settings_form()
  2. 6.3 plugins/cache/simple.inc \panels_simple_cache_settings_form()
  3. 7.3 plugins/cache/simple.inc \panels_simple_cache_settings_form()
1 string reference to 'panels_simple_cache_settings_form'
panels_simple_cache_panels_cache in panels_simple_cache/panels_simple_cache.module
Implementation of hook_panels_cache()

File

panels_simple_cache/panels_simple_cache.module, line 141
panels_simple_cache.module

Code

function panels_simple_cache_settings_form($conf, $display, $pid) {
  $options = drupal_map_assoc(array(
    15,
    30,
    60,
    120,
    180,
    240,
    300,
    600,
    900,
    1200,
    1800,
    3600,
    7200,
    14400,
    28800,
    43200,
    86400,
    172800,
    259200,
    345600,
    604800,
  ), 'format_interval');
  $form['lifetime'] = array(
    '#title' => t('Lifetime'),
    '#type' => 'select',
    '#options' => $options,
    '#default_value' => $conf['lifetime'],
  );
  $form['granularity'] = array(
    '#title' => t('Granularity'),
    '#type' => t('select'),
    '#options' => array(
      'args' => t('Arguments'),
      'context' => t('Context'),
      'none' => t('None'),
    ),
    '#description' => t('If "arguments" are selected, this content will be cached per individual argument to the entire display; if "contexts" are selected, this content will be cached per unique context in the pane or display; if "neither" there will be only one cache for this pane.'),
    '#default_value' => $conf['granularity'],
  );
  return $form;
}