You are here

purge_ui.module in Purge 7.2

File

purge_ui.module
View source
<?php

/**
 * @file
 * Purge clears url's from reverse proxy caches like Varnish and Squid by
 * issuing HTTP PURGE requests.
 */
module_load_include('inc', 'purge', 'includes/purge_ui');

/**
 * Implements hook_menu().
 *
 * Set up admin settings callbacks, etc.
 */
function purge_menu() {
  $items = array();
  $items['admin/config/system/purge'] = array(
    'title' => 'Purge',
    'description' => 'Configure the Purge module',
    'type' => MENU_NORMAL_ITEM,
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'purge_configuration_form',
    ),
    'access arguments' => array(
      'administer site configuration',
    ),
    'file path' => drupal_get_path('module', 'purge'),
    'file' => 'includes/purge_ui.inc',
  );
  $items['admin/config/system/purge/view/%'] = array(
    'title' => 'Configuration Items',
    'type' => MENU_NORMAL_ITEM,
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'purge_configuration_form',
      'view',
      5,
    ),
    'access arguments' => array(
      'administer site configuration',
    ),
    'file path' => drupal_get_path('module', 'purge'),
    'file' => 'includes/purge_ui.inc',
  );
  $items['admin/config/system/purge/view/%/%'] = array(
    'title' => 'Purge Configuration Item',
    'type' => MENU_NORMAL_ITEM,
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'purge_item_form',
      'view',
      5,
      6,
    ),
    'access arguments' => array(
      'administer site configuration',
    ),
    'file path' => drupal_get_path('module', 'purge'),
    'file' => 'includes/purge_ui.inc',
  );
  $items['admin/config/system/purge/add/%'] = array(
    'title' => 'Add Item',
    'type' => MENU_NORMAL_ITEM,
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'purge_item_add_form',
      5,
    ),
    'access arguments' => array(
      'administer site configuration',
    ),
    'file path' => drupal_get_path('module', 'purge'),
    'file' => 'includes/purge_ui.inc',
  );
  $items['admin/config/system/purge/add/%/%'] = array(
    'title' => 'Purge Configuration Item',
    'type' => MENU_NORMAL_ITEM,
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'purge_item_form',
      'add',
      5,
      6,
    ),
    'access arguments' => array(
      'administer site configuration',
    ),
    'file path' => drupal_get_path('module', 'purge'),
    'file' => 'includes/purge_ui.inc',
  );
  $items['admin/config/system/purge/example/%/%'] = array(
    'title' => 'Purge Configuration Item',
    'type' => MENU_NORMAL_ITEM,
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'purge_item_form',
      'example',
      5,
      6,
    ),
    'access arguments' => array(
      'administer site configuration',
    ),
    'file path' => drupal_get_path('module', 'purge'),
    'file' => 'includes/purge_ui.inc',
  );
  $items['admin/config/system/purge/edit/%'] = array(
    'title' => 'Purge Configuration Item',
    'type' => MENU_NORMAL_ITEM,
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'purge_item_form',
      'edit',
      5,
    ),
    'access arguments' => array(
      'administer site configuration',
    ),
    'file path' => drupal_get_path('module', 'purge'),
    'file' => 'includes/purge_ui.inc',
  );
  $items['admin/config/system/purge/edit/%/%'] = array(
    'title' => 'Purge Configuration Item',
    'type' => MENU_NORMAL_ITEM,
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'purge_item_form',
      'edit',
      5,
      6,
    ),
    'access arguments' => array(
      'administer site configuration',
    ),
    'file path' => drupal_get_path('module', 'purge'),
    'file' => 'includes/purge_ui.inc',
  );
  $items['admin/config/system/purge/clone/%/%'] = array(
    'title' => 'Purge Configuration Item',
    'type' => MENU_NORMAL_ITEM,
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'purge_item_form',
      'clone',
      5,
      6,
    ),
    'access arguments' => array(
      'administer site configuration',
    ),
    'file path' => drupal_get_path('module', 'purge'),
    'file' => 'includes/purge_ui.inc',
  );
  $items['admin/config/system/purge/enable/%/%'] = array(
    'title' => 'Enable Item',
    'type' => MENU_CALLBACK,
    'page callback' => 'purge_item_action_callback',
    'page arguments' => array(
      5,
      6,
      4,
    ),
    'access arguments' => array(
      'administer site configuration',
    ),
    'file path' => drupal_get_path('module', 'purge'),
    'file' => 'includes/purge_ui.inc',
  );
  $items['admin/config/system/purge/disable/%/%'] = array(
    'title' => 'Disable Item',
    'type' => MENU_CALLBACK,
    'page callback' => 'purge_item_action_callback',
    'page arguments' => array(
      5,
      6,
      4,
    ),
    'access arguments' => array(
      'administer site configuration',
    ),
    'file path' => drupal_get_path('module', 'purge'),
    'file' => 'includes/purge_ui.inc',
  );
  $items['admin/config/system/purge/delete/%/%'] = array(
    'title' => 'Delete Item',
    'type' => MENU_NORMAL_ITEM,
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'purge_item_action_form',
      5,
      6,
      'delete',
    ),
    'access arguments' => array(
      'administer site configuration',
    ),
    'file path' => drupal_get_path('module', 'purge'),
    'file' => 'includes/purge_ui.inc',
  );
  return $items;
}

Functions

Namesort descending Description
purge_menu Implements hook_menu().