You are here

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

Sets event ids.

@todo - Make this depend on a parameter

6 calls to rooms_availability_assign_id()
FeatureContext::checkUnitLockedByLastBooking in test/features/bootstrap/FeatureContext.php
Checks if one unit is being locked by a booking in a date range.
RoomsBookingController::delete_event in modules/rooms_booking/rooms_booking.module
RoomsBookingController::save in modules/rooms_booking/rooms_booking.module
Implements EntityAPIControllerInterface.
rooms_booking_edit_form_get_rooms in modules/rooms_booking/rooms_booking.admin.inc
Returns a set of available units given a unit type, start and end dates.
rooms_booking_edit_form_validate in modules/rooms_booking/rooms_booking.admin.inc
Form API validate callback for the booking form.

... See full list

File

modules/rooms_availability/rooms_availability.module, line 838
Manages availability for Bookable Units and displaying dates on the jquery FullCalendar plugin.

Code

function rooms_availability_assign_id($id, $status = '1') {

  // Add eleven for now - this allows for 10 states that do not
  // refer to a specific booking.
  $id = $id + 11;
  if ($status == '0') {
    return -$id;
  }
  else {
    return $id;
  }
}