You are here

function demo_menu in Demonstration site (Sandbox / Snapshot) 7

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

Implements hook_menu().

File

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

Code

function demo_menu() {
  $admin_access = array(
    'administer demo settings',
  );
  $items['admin/structure/demo'] = array(
    'title' => 'Snapshots',
    'description' => 'Create snapshots and reset the site.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'demo_manage_form',
    ),
    'access arguments' => $admin_access,
    'file' => 'demo.admin.inc',
  );
  $items['admin/structure/demo/list'] = array(
    'title' => 'List',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => -10,
  );
  $items['admin/structure/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_ACTION,
  );
  $items['admin/structure/demo/reset'] = array(
    'title' => 'Reset',
    '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/structure/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_VISIBLE_IN_BREADCRUMB,
  );
  $items['admin/structure/demo/settings'] = array(
    'title' => 'Settings',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'demo_admin_settings',
    ),
    'access arguments' => $admin_access,
    'file' => 'demo.admin.inc',
    'type' => MENU_LOCAL_TASK,
    'weight' => 10,
  );
  $items['demo/download'] = array(
    'page callback' => 'demo_download',
    'access arguments' => $admin_access,
    'file' => 'demo.admin.inc',
    'type' => MENU_CALLBACK,
  );
  return $items;
}