function uc_addresses_menu in Ubercart Addresses 6
Same name and namespace in other branches
- 5.2 uc_addresses.module \uc_addresses_menu()
- 5 uc_addresses.module \uc_addresses_menu()
- 6.2 uc_addresses.module \uc_addresses_menu()
- 7 uc_addresses.module \uc_addresses_menu()
Implementation of hook_menu().
Return value
A array of menu items.
File
- ./
uc_addresses.module, line 77
Code
function uc_addresses_menu() {
$items = array();
$items['admin/store/settings/addresses'] = array(
'title' => 'Address settings',
'description' => 'Configure the address settings.',
'page callback' => 'uc_addresses_settings_overview',
'access arguments' => array(
'administer store',
),
'type' => MENU_NORMAL_ITEM,
'file' => 'uc_addresses.admin.inc',
);
$items['admin/store/settings/addresses/overview'] = array(
'title' => 'Overview',
'access arguments' => array(
'administer store',
),
'description' => 'View the address settings.',
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => -10,
);
$items['admin/store/settings/addresses/edit'] = array(
'title' => 'Edit',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'uc_addresses_settings_form',
),
'access arguments' => array(
'administer store',
),
'description' => 'Edit the address settings.',
'type' => MENU_LOCAL_TASK,
'weight' => -5,
'file' => 'uc_addresses.admin.inc',
);
$items['user/%user_uid_optional/addresses'] = array(
'title' => 'Addresses',
'description' => 'Manage your addresses',
'page callback' => 'uc_addresses_list_addresses',
'page arguments' => array(
1,
NULL,
),
'access callback' => 'uc_addresses_can_view_addresses',
'access arguments' => array(
1,
),
'type' => MENU_LOCAL_TASK,
);
$items['user/%user_uid_optional/addresses/list'] = array(
'title' => 'Address list',
'description' => 'Manage your addresses',
'access callback' => 'uc_addresses_can_view_addresses',
'access arguments' => array(
1,
),
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => 0,
);
$items['user/%user_uid_optional/addresses/add'] = array(
'title' => 'Add address',
'description' => 'Add a new address.',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'uc_addresses_get_address_form',
1,
NULL,
'add',
),
'access callback' => 'uc_addresses_can_add_edit_address',
'access arguments' => array(
1,
),
'type' => MENU_LOCAL_TASK,
'weight' => 3,
);
$items['user/%user_uid_optional/addresses/%uc_addresses_address'] = array(
'title' => 'View Address',
'description' => 'View one saved address',
'load arguments' => array(
1,
),
'page callback' => 'uc_addresses_list_addresses',
'page arguments' => array(
1,
arg(3),
),
'access callback' => 'uc_addresses_can_view_addresses',
'access arguments' => array(
1,
),
'type' => MENU_CALLBACK,
);
$items['user/%user_uid_optional/addresses/%uc_addresses_address/edit'] = array(
'title' => 'Edit address',
'load arguments' => array(
1,
),
'page callback' => 'drupal_get_form',
'page arguments' => array(
'uc_addresses_get_address_form',
1,
3,
'edit',
),
'access callback' => 'uc_addresses_can_add_edit_address',
'access arguments' => array(
1,
),
'type' => MENU_CALLBACK,
);
$items['user/%user_uid_optional/addresses/%uc_addresses_address/delete'] = array(
'title' => 'Delete address',
'load arguments' => array(
1,
),
'page callback' => 'uc_addresses_delete_address_confirm',
'page arguments' => array(
1,
3,
),
'access callback' => 'uc_addresses_can_add_edit_address',
'access arguments' => array(
1,
),
'type' => MENU_CALLBACK,
);
return $items;
}