You are here

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

Implements hook_menu().

File

modules/rooms_booking/rooms_booking.module, line 12
Manage Bookings - Bookings are tied to a customer profile and possible a Unit ID and Order ID.

Code

function rooms_booking_menu() {
  $items = array();
  $items['admin/rooms/bookings/customers'] = array(
    'title' => 'Customers',
    'page callback' => 'rooms_booking_get_client_profiles',
    'access callback' => 'rooms_booking_list_customer_profiles_access',
    'type' => MENU_CALLBACK,
  );
  $items['admin/rooms/bookings/room_types'] = array(
    // This is a json request to list booking room_types.
    'page callback' => 'rooms_booking_get_room_types',
    'access arguments' => array(
      'bypass rooms_booking entities access',
    ),
    'type' => MENU_CALLBACK,
  );
  $items['admin/rooms/add_customers'] = array(
    'title' => 'Add customer profile',
    'page callback' => 'rooms_booking_add_customer_profile',
    'access arguments' => array(
      'create customer profiles on bookings',
    ),
    'type' => MENU_CALLBACK,
  );
  $items['admin/rooms/customer-profiles/%/edit'] = array(
    'title' => 'Edit customer profile',
    'page callback' => 'rooms_booking_edit_customer_profile',
    'page arguments' => array(
      3,
    ),
    'access arguments' => array(
      'create customer profiles on bookings',
    ),
    'type' => MENU_CALLBACK,
  );
  $items['admin/rooms/config/children'] = array(
    'title' => 'Children Discount Settings',
    'description' => 'Configure settings for children discounts.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'rooms_booking_children_discount',
    ),
    'access arguments' => array(
      'configure room settings',
    ),
    'type' => MENU_NORMAL_ITEM,
  );
  $items['admin/views/ajax/autocomplete/rooms_unit'] = array(
    'page callback' => 'rooms_booking_views_ajax_autocomplete_unit',
    'theme callback' => 'ajax_base_page_theme',
    'access callback' => 'user_access',
    'access arguments' => array(
      'access content',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'views/rooms_booking.views.inc',
  );
  return $items;
}