function organigrams_menu in Organigrams 7
Implements hook_menu().
File
- ./
organigrams.module, line 665 - Defines the organigrams functions and entity types.
Code
function organigrams_menu() {
$items = array();
$items['admin/structure/organigrams'] = array(
'title' => 'Organigrams',
'description' => 'Create and manage organigrams.',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'organigrams_form_overview_organigrams',
),
'access arguments' => array(
'administer organigrams',
),
'file' => 'organigrams.admin.inc',
);
$items['admin/structure/organigrams/list'] = array(
'title' => 'List organigrams',
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => -10,
);
$items['admin/structure/organigrams/add'] = array(
'title' => 'Add organigram',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'organigrams_form_organigrams',
),
'access arguments' => array(
'administer organigrams',
),
'type' => MENU_LOCAL_ACTION,
'file' => 'organigrams.admin.inc',
);
$items['admin/structure/organigrams/import'] = array(
'title' => 'Import organigram',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'organigrams_form_import',
),
'access arguments' => array(
'administer organigrams',
),
'file' => 'organigrams.admin.inc',
'type' => MENU_LOCAL_ACTION,
);
$items['admin/structure/organigrams/%organigrams_machine_name'] = array(
'title callback' => 'organigrams_title',
'title arguments' => array(
3,
),
'page callback' => 'drupal_get_form',
'page arguments' => array(
'organigrams_form_overview_organigrams_items',
3,
),
'access callback' => 'organigrams_user_access',
'access arguments' => array(
'edit',
3,
),
'file' => 'organigrams_item.admin.inc',
);
$items['admin/structure/organigrams/%organigrams_machine_name/list'] = array(
'title' => 'List items',
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => 2,
);
$items['admin/structure/organigrams/%organigrams_machine_name/add'] = array(
'title' => 'Add item',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'organigrams_form_organigrams_item',
array(),
3,
),
'access callback' => 'organigrams_user_access',
'access arguments' => array(
'edit',
3,
),
'file' => 'organigrams_item.admin.inc',
'type' => MENU_LOCAL_ACTION,
'weight' => 1,
);
$items['admin/structure/organigrams/%organigrams_machine_name/import'] = array(
'title' => 'Import items',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'organigrams_form_import_items',
3,
),
'access callback' => 'organigrams_user_access',
'access arguments' => array(
'edit',
3,
),
'file' => 'organigrams.admin.inc',
'type' => MENU_LOCAL_ACTION,
'weight' => 2,
);
$items['admin/structure/organigrams/%organigrams_machine_name/export'] = array(
'title' => 'Export items',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'organigrams_form_export',
3,
),
'access callback' => 'organigrams_user_access',
'access arguments' => array(
'edit',
3,
),
'file' => 'organigrams.admin.inc',
'type' => MENU_LOCAL_ACTION,
'weight' => 3,
);
$items['admin/structure/organigrams/%organigrams_machine_name/view'] = array(
'title' => 'View',
'page callback' => 'organigrams_redirect_to_view_page',
'page arguments' => array(
3,
),
'access callback' => 'organigrams_user_access',
'access arguments' => array(
'view',
3,
),
'type' => MENU_LOCAL_TASK,
'weight' => 1,
);
$items['admin/structure/organigrams/%organigrams_machine_name/edit'] = array(
'title' => 'Edit',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'organigrams_form_organigrams',
3,
),
'access callback' => 'organigrams_user_access',
'access arguments' => array(
'edit',
3,
),
'file' => 'organigrams.admin.inc',
'type' => MENU_LOCAL_TASK,
'weight' => 5,
);
$items['admin/structure/organigrams/%organigrams_machine_name/delete'] = array(
'title' => 'Delete',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'organigrams_form_confirm_delete_organigrams',
3,
),
'access callback' => 'organigrams_user_access',
'access arguments' => array(
'delete',
3,
),
'file' => 'organigrams.admin.inc',
'type' => MENU_LOCAL_TASK,
'weight' => 6,
);
$items['admin/structure/organigrams/%organigrams_machine_name/item/%organigrams_item'] = array(
'title callback' => 'organigrams_item_title',
'title arguments' => array(
5,
),
'page callback' => 'drupal_get_form',
'page arguments' => array(
'organigrams_form_organigrams_item',
5,
3,
),
'access callback' => 'organigrams_user_access',
'access arguments' => array(
'edit',
3,
),
'file' => 'organigrams_item.admin.inc',
);
$items['admin/structure/organigrams/%organigrams_machine_name/item/%organigrams_item/edit'] = array(
'title' => 'Edit item',
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => 0,
);
$items['admin/structure/organigrams/%/item/%/view_organigram'] = array(
'title' => 'View organigram',
'page callback' => 'organigrams_redirect_to_organigrams_view',
'page arguments' => array(
3,
),
'access callback' => 'organigrams_user_access',
'access arguments' => array(
'edit',
3,
),
'file' => 'organigrams_item.admin.inc',
'type' => MENU_LOCAL_TASK,
'weight' => -10,
);
$items['admin/structure/organigrams/%/item/%/list'] = array(
'title' => 'List items',
'page callback' => 'organigrams_redirect_to_organigrams_item_overview',
'page arguments' => array(
3,
),
'access callback' => 'organigrams_user_access',
'access arguments' => array(
'edit',
3,
),
'file' => 'organigrams_item.admin.inc',
'type' => MENU_LOCAL_TASK,
'weight' => -9,
);
$items['admin/structure/organigrams/%organigrams_machine_name/item/%organigrams_item/delete'] = array(
'title' => 'Delete item',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'organigrams_form_confirm_delete_organigrams_item',
5,
),
'access callback' => 'organigrams_user_access',
'access arguments' => array(
'delete',
5,
),
'type' => MENU_LOCAL_TASK,
'file' => 'organigrams_item.admin.inc',
'weight' => 10,
);
$items['organigram/%organigrams_machine_name'] = array(
'title callback' => 'organigrams_title',
'title arguments' => array(
1,
),
'page callback' => 'organigrams_view_page',
'page arguments' => array(
1,
),
'access callback' => 'organigrams_user_access',
'access arguments' => array(
'view',
1,
),
'type' => MENU_CALLBACK,
);
$items['organigram/%organigrams_machine_name/view'] = array(
'title' => 'View',
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => 1,
);
$items['organigram/%/edit'] = array(
'title' => 'Edit',
'page callback' => 'organigrams_redirect_to_organigrams_item_overview',
'page arguments' => array(
1,
),
'access callback' => 'organigrams_user_access',
'access arguments' => array(
'edit',
1,
),
'file' => 'organigrams_item.admin.inc',
'type' => MENU_LOCAL_TASK,
'weight' => 2,
);
return $items;
}