function uc_addresses_menu in Ubercart Addresses 7
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()
- 6 uc_addresses.module \uc_addresses_menu()
Implements hook_menu().
Return value
array A list of menu items.
File
- ./
uc_addresses.module, line 129 - Adds user profile address support to Ubercart.
Code
function uc_addresses_menu() {
$items = array();
// Address book pages.
$items['user/%user_uid_optional/addresses'] = array(
'title' => 'Address book',
'description' => 'Manage your addresses',
'page callback' => 'uc_addresses_address_book',
'page arguments' => array(
1,
NULL,
),
'access callback' => 'uc_addresses_access',
'access arguments' => array(
'canViewAddress',
1,
),
'type' => MENU_LOCAL_TASK,
'file' => 'uc_addresses.pages.inc',
);
$items['user/%user_uid_optional/addresses/list'] = array(
'title' => 'Address list',
'description' => 'Manage your addresses',
'access callback' => 'uc_addresses_access',
'access arguments' => array(
'canViewAddress',
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,
),
'access callback' => 'uc_addresses_access',
'access arguments' => array(
'canEditAddress',
1,
),
'type' => MENU_LOCAL_TASK,
'weight' => 3,
'file' => 'uc_addresses.pages.inc',
);
$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_one_address',
'page arguments' => array(
1,
3,
),
'access callback' => 'uc_addresses_access',
'access arguments' => array(
'canViewAddress',
1,
3,
),
'type' => MENU_CALLBACK,
'file' => 'uc_addresses.pages.inc',
);
$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,
),
'access callback' => 'uc_addresses_access',
'access arguments' => array(
'canEditAddress',
1,
3,
),
'type' => MENU_CALLBACK,
'file' => 'uc_addresses.pages.inc',
);
$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_access',
'access arguments' => array(
'canDeleteAddress',
1,
3,
),
'type' => MENU_CALLBACK,
'file' => 'uc_addresses.pages.inc',
);
// Admin pages.
$items['admin/store/settings/addresses'] = array(
'title' => 'Address settings',
'description' => 'Configure the address settings.',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'uc_addresses_settings_form',
),
'access arguments' => array(
'administer store',
),
'type' => MENU_NORMAL_ITEM,
'weight' => -5,
'file' => 'uc_addresses.admin.inc',
);
$items['admin/store/settings/countries/uc_addresses_formats'] = array(
'title' => 'Ubercart Addresses address formats',
'description' => 'Edit the country specific format settings for Ubercart Addresses.',
'page callback' => 'uc_addresses_country_formats_page',
'access arguments' => array(
'administer store',
),
'type' => MENU_LOCAL_TASK,
'file' => 'uc_addresses.admin.inc',
);
return $items;
}