You are here

function commerce_wishlist_menu in Commerce Wishlist 7

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

Implements hook_menu().

File

./commerce_wishlist.module, line 11
Provides the wishlist for use in Drupal Commerce.

Code

function commerce_wishlist_menu() {
  $items = array();
  $items['user/%user/wishlist/delete/%'] = array(
    'page callback' => 'commerce_wishlist_delete',
    'page arguments' => array(
      1,
      4,
    ),
    'access callback' => 'commerce_wishlist_access',
    'access arguments' => array(
      1,
      4,
    ),
    'type' => MENU_CALLBACK,
  );
  $items['admin/commerce/config/wishlist'] = array(
    'title' => 'Wishlist configuration',
    'description' => 'Configure wishlist',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'commerce_wishlist_admin_form',
    ),
    'access arguments' => array(
      'administer wishlists',
    ),
    'file' => 'commerce_wishlist.admin.inc',
  );
  $items['wishlist-actions'] = array(
    'page callback' => 'commerce_wishlist_operations',
    'access arguments' => array(
      'view own wishlist',
    ),
    'type' => MENU_CALLBACK,
  );
  return $items;
}