You are here

function rooms_booking_manager_menu in Rooms - Drupal Booking for Hotels, B&Bs and Vacation Rentals 7

Implements hook_menu().

File

modules/rooms_booking_manager/rooms_booking_manager.module, line 33
Rooms Booking Manager brings together all the pieces required to find a room and book it - including the DrupalCommerce integration

Code

function rooms_booking_manager_menu() {
  $items = array();
  $items['booking'] = array(
    'title' => 'Create your booking',
    'title callback' => 'rooms_booking_manager_menu_title_callback',
    'title arguments' => array(
      'booking',
    ),
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'rooms_booking_availability_search_form_page',
    ),
    'file' => 'rooms_booking_manager.availability_search.inc',
    'access arguments' => array(
      'book units',
    ),
    'type' => MENU_NORMAL_ITEM,
  );
  $items['booking/%start_date/%end_date'] = array(
    'title' => 'Select your stay',
    'title callback' => 'rooms_booking_manager_menu_title_callback',
    'title arguments' => array(
      'select_your_stay',
    ),
    'page callback' => 'rooms_booking_manager_results_page',
    'page arguments' => array(
      1,
      2,
    ),
    'access arguments' => array(
      'book units',
    ),
    'type' => MENU_CALLBACK,
  );
  $items['booking-override-confirmation/%start_date/%end_date'] = array(
    'title' => 'Select your stay',
    'page callback' => 'rooms_booking_manager_override_confirmation_page',
    'page arguments' => array(
      1,
      2,
    ),
    'file' => 'rooms_booking_manager.confirmation_override.inc',
    'access arguments' => array(
      'book units',
    ),
    'type' => MENU_CALLBACK,
  );
  $items['enquiry/%start_date/%end_date'] = array(
    'title' => 'Ask about availability',
    'page callback' => 'rooms_booking_manager_enquiry_page',
    'page arguments' => array(
      1,
      2,
    ),
    'access arguments' => array(
      'book units',
    ),
    'type' => MENU_CALLBACK,
  );
  $items['bookings'] = array(
    'title' => 'Review your reservation',
    'title callback' => 'rooms_booking_manager_menu_title_callback',
    'title arguments' => array(
      'bookings',
    ),
    'page callback' => 'rooms_booking_manager_cart_view',
    'access arguments' => array(
      'access checkout',
    ),
  );
  $items['enquiry-confirmation'] = array(
    'title' => 'Availability enquiry',
    'page callback' => 'rooms_booking_manager_enquiry_confirmation',
    'access arguments' => array(
      'access content',
    ),
    'type' => MENU_CALLBACK,
  );
  return $items;
}