You are here

function oa_wizard_menu in Open Atrium Wizard 7.2

Implements hook_menu().

File

./oa_wizard.module, line 16
Code for the OpenAtrium Wizard.

Code

function oa_wizard_menu() {
  $items['api/oa_wizard/%'] = array(
    'page callback' => 'oa_wizard_modal_callback',
    'page arguments' => array(
      2,
    ),
    'access arguments' => array(
      'access content',
    ),
  );
  $base = array(
    'access arguments' => array(
      'administer site configuration',
    ),
    'file' => 'oa_wizard.admin.inc',
  );
  $items['admin/structure/wizards'] = array(
    'title' => 'Wizards',
    'description' => 'Manage wizards.',
    'page callback' => 'oa_wizard_entities_page',
  ) + $base;
  $items['admin/structure/wizards/list'] = array(
    'title' => 'List',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => -10,
  ) + $base;
  $items['admin/structure/wizards/manage/%oa_wizard_type'] = array(
    'title callback' => 'oa_wizard_entities_title',
    'title arguments' => array(
      4,
    ),
    'page callback' => 'oa_wizard_entities_list_page',
    'page arguments' => array(
      4,
    ),
  ) + $base;
  $items['admin/structure/wizards/manage/%oa_wizard_type/add'] = array(
    'title' => 'Add a wizard',
    'page callback' => 'oa_wizard_entities_add_page',
    'page arguments' => array(
      4,
    ),
    'type' => MENU_NORMAL_ITEM,
  ) + $base;
  $items['admin/structure/wizards/view/%oa_wizard'] = array(
    'title callback' => 'oa_wizard_entity_title',
    'title arguments' => array(
      4,
    ),
    'page callback' => 'oa_wizard_view',
    'page arguments' => array(
      4,
    ),
  ) + $base;
  $items['admin/structure/wizards/view/%oa_wizard/view'] = array(
    'title' => 'View',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'page callback' => 'oa_wizard_view',
    'page arguments' => array(
      4,
    ),
    'weight' => -10,
  ) + $base;
  $items['admin/structure/wizards/view/%oa_wizard/edit'] = array(
    'title' => 'Edit',
    'type' => MENU_LOCAL_TASK,
    'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE,
    'page callback' => 'oa_wizard_entity_edit_page',
    'page arguments' => array(
      4,
    ),
    'weight' => -9,
  ) + $base;
  $items['admin/structure/wizards/view/%oa_wizard/delete'] = array(
    'title' => 'Delete',
    'type' => MENU_LOCAL_TASK,
    'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE,
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'oa_wizard_entity_delete_form',
      4,
    ),
    'weight' => -8,
  ) + $base;
  return $items;
}