You are here

function basic_cart_menu in Basic cart 7

Same name and namespace in other branches
  1. 7.3 basic_cart.module \basic_cart_menu()
  2. 7.2 basic_cart.module \basic_cart_menu()

Implements hook_menu().

File

./basic_cart.module, line 28
Basic cart module file.

Code

function basic_cart_menu() {
  $items = array();
  $items['admin/config/basic_cart'] = array(
    'title' => 'Basic cart',
    'description' => 'Basic cart content type selection.',
    'position' => 'left',
    'weight' => -10,
    'page callback' => 'system_admin_menu_block_page',
    'access arguments' => array(
      'administer basic cart',
    ),
    'file' => 'system.admin.inc',
    'file path' => drupal_get_path('module', 'system'),
  );
  $items['admin/config/basic_cart/settings'] = array(
    'title' => 'Basic cart',
    'description' => 'Basic cart content type selection.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'basic_cart_admin_content_type',
    ),
    'access arguments' => array(
      'administer basic cart',
    ),
    'type' => MENU_NORMAL_ITEM,
    'file' => 'basic_cart.admin.inc',
  );
  $items['cart'] = array(
    'title' => 'Your shopping cart',
    'description' => 'The shopping cart page',
    'page callback' => 'basic_cart_cart',
    'access arguments' => array(
      'use basic cart',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'basic_cart.cart.inc',
  );
  $items['cart/add'] = array(
    'title' => 'Add to cart',
    'description' => 'Add to cart url.',
    'page callback' => 'basic_cart_add_to_cart',
    'access arguments' => array(
      'use basic cart',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'basic_cart.cart.inc',
  );
  $items['cart/remove'] = array(
    'title' => 'Remove from cart',
    'description' => 'Remove from cart url.',
    'page callback' => 'basic_cart_remove_from_cart',
    'access arguments' => array(
      'use basic cart',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'basic_cart.cart.inc',
  );
  $items['checkout'] = array(
    'title' => 'Checkout',
    'description' => 'Checkout.',
    'page callback' => 'basic_cart_checkout',
    'access arguments' => array(
      'use basic cart',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'basic_cart.cart.inc',
  );
  $items['checkout/thank-you'] = array(
    'title' => 'Thank you',
    'description' => 'Checkout thank you page.',
    'page callback' => 'basic_cart_checkout_thank_you',
    'access arguments' => array(
      'use basic cart',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'basic_cart.cart.inc',
  );
  return $items;
}