You are here

function uc_coupon_purchase_menu in Ubercart Discount Coupons 7.2

Same name and namespace in other branches
  1. 5 uc_coupon_purchase/uc_coupon_purchase.module \uc_coupon_purchase_menu()
  2. 6 uc_coupon_purchase/uc_coupon_purchase.module \uc_coupon_purchase_menu()
  3. 7.3 uc_coupon_purchase/uc_coupon_purchase.module \uc_coupon_purchase_menu()

Implements hook_menu().

File

uc_coupon_purchase/uc_coupon_purchase.module, line 18

Code

function uc_coupon_purchase_menu() {
  $items = array();
  $items['user/%user/coupons'] = array(
    'title' => 'Coupons',
    'description' => 'View your purchased coupons.',
    'page callback' => 'uc_coupon_purchase_view',
    'access callback' => 'uc_coupon_purchase_can_view',
    'page arguments' => array(
      1,
    ),
    'access arguments' => array(
      1,
    ),
    'type' => MENU_LOCAL_TASK,
    'file' => 'uc_coupon_purchase.pages.inc',
    'weight' => 5,
  );
  $items['user/%user/coupons/%uc_coupon'] = array(
    'title' => 'Print preview',
    'page callback' => 'uc_coupon_purchase_print',
    'access callback' => 'uc_coupon_purchase_can_view',
    'page arguments' => array(
      1,
      3,
    ),
    'access arguments' => array(
      1,
      3,
    ),
    'type' => MENU_LOCAL_TASK,
    'file' => 'uc_coupon_purchase.pages.inc',
    'weight' => 5,
  );
  $items['user/%user/coupons/%uc_coupon/codes'] = array(
    'title' => 'Download codes',
    'page callback' => 'uc_coupon_codes_csv',
    'access callback' => 'uc_coupon_purchase_can_view',
    'page arguments' => array(
      3,
    ),
    'access arguments' => array(
      1,
      3,
    ),
    'type' => MENU_CALLBACK,
    'file' => 'uc_coupon.admin.inc',
    'file path' => drupal_get_path('module', 'uc_coupon'),
    'weight' => 5,
  );
  return $items;
}