You are here

function uc_quote_menu in Ubercart 5

Same name and namespace in other branches
  1. 6.2 shipping/uc_quote/uc_quote.module \uc_quote_menu()
  2. 7.3 shipping/uc_quote/uc_quote.module \uc_quote_menu()

Implementation of hook_menu().

File

shipping/uc_quote/uc_quote.module, line 28
The controller module for fulfillment modules that process physical goods.

Code

function uc_quote_menu($may_cache) {
  $items = array();
  if ($may_cache) {
    $items[] = array(
      'path' => 'admin/store/settings/quotes',
      'access' => user_access('configure quotes'),
      'title' => t('Shipping quote settings'),
      'description' => t('Configure the shipping quote settings.'),
      'callback' => 'uc_quote_overview',
      'type' => MENU_NORMAL_ITEM,
    );
    $items[] = array(
      'path' => 'admin/store/settings/quotes/overview',
      'access' => user_access('configure quotes'),
      'title' => t('Overview'),
      'description' => t('View general shipping quote settings.'),
      'type' => MENU_DEFAULT_LOCAL_TASK,
      'weight' => -10,
    );
    $items[] = array(
      'path' => 'admin/store/settings/quotes/edit',
      'access' => user_access('configure quotes'),
      'title' => t('Edit'),
      'callback' => 'drupal_get_form',
      'callback arguments' => 'uc_quote_admin_settings',
      'type' => MENU_LOCAL_TASK,
      'weight' => -8,
    );
    $items[] = array(
      'path' => 'admin/store/settings/quotes/methods',
      'access' => user_access('configure quotes'),
      'title' => t('Quote methods'),
      'callback' => 'drupal_get_form',
      'callback arguments' => array(
        'uc_quote_method_settings',
      ),
      'type' => MENU_LOCAL_TASK,
      'weight' => -5,
    );
    $items[] = array(
      'path' => 'admin/store/settings/quotes/methods/general',
      'title' => t('General settings'),
      'type' => MENU_DEFAULT_LOCAL_TASK,
      'weight' => -10,
    );
    $items[] = array(
      'path' => 'cart/checkout/shipping/quote',
      'access' => user_access('access content'),
      'callback' => 'uc_quote_request_quotes',
      'type' => MENU_CALLBACK,
    );
  }
  else {
    drupal_add_css(drupal_get_path('module', 'uc_quote') . '/uc_quote.css', 'module');
  }
  return $items;
}