You are here

function expire_admin_settings_form in Cache Expiration 6

Same name and namespace in other branches
  1. 7.2 expire.admin.inc \expire_admin_settings_form()
  2. 7 expire.admin.inc \expire_admin_settings_form()

Implementation of the former hook_settings().

1 string reference to 'expire_admin_settings_form'
expire_menu in ./expire.module
Implementation of hook_menu().

File

./expire.admin.inc, line 11
Provides form for changing settings

Code

function expire_admin_settings_form() {
  drupal_set_title(t('Cache Expiration'));
  $form['expire'] = array(
    '#type' => 'fieldset',
    '#title' => t('What to expire'),
  );
  $form['expire']['expire_flush_front'] = array(
    '#type' => 'checkbox',
    '#title' => t('Expire front page'),
    '#default_value' => variable_get('expire_flush_front', EXPIRE_FLUSH_FRONT),
    '#description' => t('When expiring a node: if promoted to front page, expire front page.'),
  );
  $form['expire']['expire_flush_node_terms'] = array(
    '#type' => 'checkbox',
    '#title' => t('Expire node term pages'),
    '#default_value' => variable_get('expire_flush_node_terms', EXPIRE_FLUSH_NODE_TERMS),
    '#description' => t('When expiring a node: expire taxonomy pages for its terms.'),
  );
  $form['expire']['expire_flush_menu_items'] = array(
    '#type' => 'radios',
    '#title' => t('Expire menus'),
    '#options' => array(
      0 => t('No'),
      EXPIRE_FLUSH_MENU_ITEMS => t('Family'),
      2 => t('Entire menu'),
    ),
    '#default_value' => variable_get('expire_flush_menu_items', EXPIRE_FLUSH_MENU_ITEMS),
    '#description' => t('When expiring a node: expire related menu items or entire menu'),
  );
  $form['expire']['expire_flush_cck_references'] = array(
    '#type' => 'checkbox',
    '#title' => t('Expire CCK node references'),
    '#default_value' => variable_get('expire_flush_cck_references', EXPIRE_FLUSH_CCK_REFERENCES),
    '#description' => t('When expiring a node: expire its node references and nodes containing it in their own node references.'),
  );
  $form['format'] = array(
    '#type' => 'fieldset',
    '#title' => t('Expire protocol'),
  );
  $form['format']['expire_include_base_url'] = array(
    '#type' => 'checkbox',
    '#title' => t('Include base URL in expires'),
    '#default_value' => variable_get('expire_include_base_url', EXPIRE_INCLUDE_BASE_URL),
    '#description' => t('Include the base URL in expire requests. Compatible with Domain Access'),
  );
  return system_settings_form($form);
}