You are here

function uc_taxes_menu in Ubercart 5

Same name and namespace in other branches
  1. 6.2 uc_taxes/uc_taxes.module \uc_taxes_menu()
  2. 7.3 uc_taxes/uc_taxes.module \uc_taxes_menu()

Implementation of hook_menu().

File

uc_taxes/uc_taxes.module, line 35

Code

function uc_taxes_menu($may_cache) {
  $items = array();
  if ($may_cache) {
    $items[] = array(
      'path' => 'admin/store/settings/taxes',
      'title' => t('Tax rates and settings'),
      'access' => user_access('configure taxes'),
      'callback' => 'uc_taxes_admin_settings',
      'type' => MENU_NORMAL_ITEM,
    );
    $items[] = array(
      'path' => 'admin/store/settings/taxes/edit',
      'title' => t('Edit tax rule'),
      'access' => user_access('configure taxes'),
      'callback' => 'drupal_get_form',
      'callback arguments' => array(
        'uc_taxes_form',
      ),
      'type' => MENU_CALLBACK,
    );
    $items[] = array(
      'path' => 'admin/store/settings/taxes/copy',
      'access' => user_access('configure taxes'),
      'callback' => 'uc_taxes_copy',
      'type' => MENU_CALLBACK,
    );
    $items[] = array(
      'path' => 'admin/store/settings/taxes/delete',
      'title' => t('Delete tax rule'),
      'access' => user_access('configure taxes'),
      'callback' => 'drupal_get_form',
      'callback arguments' => array(
        'uc_taxes_delete',
      ),
      'type' => MENU_CALLBACK,
    );
    $items[] = array(
      'path' => 'taxes/calculate',
      'access' => TRUE,
      'callback' => 'uc_taxes_javascript',
      'type' => MENU_CALLBACK,
    );
  }
  return $items;
}