You are here

function demo_menu in Demonstration site (Sandbox / Snapshot) 6

Same name and namespace in other branches
  1. 5 demo.module \demo_menu()
  2. 7 demo.module \demo_menu()

Implements hook_menu().

File

./demo.module, line 18
Demonstration site API Drupal integration functions.

Code

function demo_menu() {
  $admin_access = array(
    'administer demo settings',
  );
  $items['admin/build/demo'] = array(
    'title' => 'Demonstration site',
    'description' => 'Administer reset interval, create new dumps and manually reset this site.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'demo_admin_settings',
    ),
    'access arguments' => $admin_access,
    'file' => 'demo.admin.inc',
  );
  $items['admin/build/demo/maintenance'] = array(
    'title' => 'Status',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => 0,
  );
  $items['admin/build/demo/manage'] = array(
    'title' => 'Manage snapshots',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'demo_manage_form',
    ),
    'access arguments' => $admin_access,
    'file' => 'demo.admin.inc',
    'type' => MENU_LOCAL_TASK,
    'weight' => 1,
  );
  $items['admin/build/demo/dump'] = array(
    'title' => 'Create snapshot',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'demo_dump_form',
    ),
    'access arguments' => $admin_access,
    'file' => 'demo.admin.inc',
    'type' => MENU_LOCAL_TASK,
    'weight' => 2,
  );
  $items['admin/build/demo/reset'] = array(
    'title' => 'Reset site',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'demo_reset_confirm',
    ),
    'access arguments' => $admin_access,
    'file' => 'demo.admin.inc',
    'type' => MENU_LOCAL_TASK,
    'weight' => 3,
  );
  $items['admin/build/demo/delete/%'] = array(
    'title' => 'Delete snapshot',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'demo_delete_confirm',
      4,
    ),
    'access arguments' => $admin_access,
    'file' => 'demo.admin.inc',
    'type' => MENU_CALLBACK,
  );
  $items['demo/autocomplete'] = array(
    'page callback' => 'demo_autocomplete',
    'access arguments' => $admin_access,
    'file' => 'demo.admin.inc',
    'type' => MENU_CALLBACK,
  );
  $items['demo/download'] = array(
    'page callback' => 'demo_download',
    'access arguments' => $admin_access,
    'file' => 'demo.admin.inc',
    'type' => MENU_CALLBACK,
  );
  return $items;
}