You are here

function uc_wishlist_menu in UC Wish List 6

Same name and namespace in other branches
  1. 7 uc_wishlist.module \uc_wishlist_menu()

Implementation of hook_menu().

File

./uc_wishlist.module, line 21
Allows users to create public shopping/wish lists.

Code

function uc_wishlist_menu() {
  $items = array();
  $items['admin/store/customers/wishlist'] = array(
    'title' => 'Wish lists',
    'description' => 'Manage user wish lists.',
    'page callback' => 'uc_wishlist_admin',
    'access arguments' => array(
      'administer wish lists',
    ),
    'file' => 'uc_wishlist.admin.inc',
  );
  $items['admin/store/customers/wishlist/%uc_wishlist/delete'] = array(
    'title' => 'Delete a wish list',
    'description' => 'Confirm the deletion of a wish list.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'uc_wishlist_admin_delete_form',
      4,
    ),
    'access arguments' => array(
      'administer wish lists',
    ),
    'file' => 'uc_wishlist.admin.inc',
  );
  $items['admin/store/settings/wishlist'] = array(
    'title' => 'Wish list settings',
    'description' => 'Configure the wish list settings.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'uc_wishlist_admin_settings_form',
    ),
    'access arguments' => array(
      'administer wish lists',
    ),
    'file' => 'uc_wishlist.admin.inc',
  );
  $items['wishlist'] = array(
    'title' => 'Wish list',
    'description' => 'View or modify the contents of your wish list.',
    'page callback' => 'uc_wishlist_display',
    'access arguments' => array(
      'access wish lists',
    ),
    'file' => 'uc_wishlist.pages.inc',
  );
  $items['wishlist/search'] = array(
    'title' => 'Find a wish list',
    'description' => 'Search for a wish list.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'uc_wishlist_search_form',
    ),
    'access arguments' => array(
      'access wish lists',
    ),
    'file' => 'uc_wishlist.pages.inc',
  );
  $items['wishlist/search/%'] = array(
    'title' => 'Find a wish list',
    'description' => 'Search for a wish list.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'uc_wishlist_search_form',
      2,
    ),
    'access arguments' => array(
      'access wish lists',
    ),
    'file' => 'uc_wishlist.pages.inc',
  );

  // TODO: Convert this to use the autoloaded %uc_wishlist.
  $items['wishlist/%'] = array(
    'title' => 'Wish list',
    'description' => 'View or modify the contents of your wish list.',
    'page callback' => 'uc_wishlist_display',
    'page arguments' => array(
      1,
    ),
    'access arguments' => array(
      'access wish lists',
    ),
    'file' => 'uc_wishlist.pages.inc',
  );
  $items['user/%user/wishlist'] = array(
    'title' => 'Wish list',
    'description' => 'View or modify the contents of your wish list.',
    'page callback' => 'uc_wishlist_display',
    'page arguments' => array(
      1,
      'user',
    ),
    'access callback' => 'user_view_access',
    'access arguments' => array(
      1,
    ),
    'file' => 'uc_wishlist.pages.inc',
    'type' => MENU_LOCAL_TASK,
  );
  return $items;
}