function uc_flatrate_menu in Ubercart 5
Same name and namespace in other branches
- 6.2 shipping/uc_flatrate/uc_flatrate.module \uc_flatrate_menu()
- 7.3 shipping/uc_flatrate/uc_flatrate.module \uc_flatrate_menu()
Implementation of hook_menu().
File
- shipping/
uc_flatrate/ uc_flatrate.module, line 17 - Shipping quote module that defines a flat shipping rate for each product.
Code
function uc_flatrate_menu($may_cache) {
$items = array();
if ($may_cache) {
$items[] = array(
'path' => 'admin/store/settings/quotes/methods/flatrate',
'access' => user_access('configure quotes'),
'title' => t('Flat rate'),
'callback' => 'uc_flatrate_admin_methods',
'type' => MENU_LOCAL_TASK,
);
}
else {
$items[] = array(
'path' => 'admin/store/settings/quotes/methods/flatrate/' . arg(6),
'access' => user_access('configure quotes'),
'title' => t('Edit flat rate method'),
'callback' => 'drupal_get_form',
'callback arguments' => array(
'uc_flatrate_admin_method_edit_form',
arg(6),
),
'type' => MENU_CALLBACK,
);
$items[] = array(
'path' => 'admin/store/settings/quotes/methods/flatrate/' . arg(6) . '/delete',
'access' => user_access('configure quotes'),
'title' => t('Delete flat rate method'),
'callback' => 'drupal_get_form',
'callback arguments' => array(
'uc_flatrate_admin_method_confirm_delete',
arg(6),
),
'type' => MENU_CALLBACK,
);
}
return $items;
}