You are here

function uc_fedex_menu in FedEx Shipping 5

Same name and namespace in other branches
  1. 6.2 uc_fedex.module \uc_fedex_menu()
  2. 6 uc_fedex.module \uc_fedex_menu()
  3. 7.2 uc_fedex.module \uc_fedex_menu()
  4. 7 uc_fedex.module \uc_fedex_menu()

Implementation of hook_menu(). Called when Drupal is building menus. Cache parameter lets module know if Drupal intends to cache menu or not - different results may be returned for either case.

Parameters

may_cache: TRUE when Drupal is building menus it will cache

Return value

An array with the menu path, callback, and parameters.

File

./uc_fedex.module, line 37
FedEx Web Services Rate / Available Services Quote

Code

function uc_fedex_menu($may_cache) {
  $items = array();
  if ($may_cache) {
    $items[] = array(
      'path' => 'admin/store/settings/quotes/methods/fedex',
      'title' => t('FedEx'),
      'access' => user_access('configure quotes'),
      'callback' => 'drupal_get_form',
      'callback arguments' => 'uc_fedex_admin_settings',
      'type' => MENU_LOCAL_TASK,
    );
  }
  else {
    drupal_add_css(drupal_get_path('module', 'uc_fedex') . '/uc_fedex.css');
  }
  return $items;
}