You are here

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

Deletes a booking.

Parameters

RoomsBooking $booking: The RoomsBooking object that represents the booking to delete

bool $delete_line_item: Flag indicating if the associated line_item should be deleted or not.

4 calls to rooms_booking_delete()
rooms_booking_commerce_line_item_delete in modules/rooms_booking/rooms_booking.module
Implements hook_commerce_line_item_delete().
rooms_booking_commerce_order_delete in modules/rooms_booking/rooms_booking.module
Implements hook_commerce_order_delete().
rooms_booking_delete_form_submit in modules/rooms_booking/rooms_booking.admin.inc
Submit callback for booking_delete_form.
rooms_booking_form_submit_delete in modules/rooms_booking/rooms_booking.admin.inc
Form API submit callback for the delete button.

File

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

Code

function rooms_booking_delete(RoomsBooking $booking, $delete_line_item = TRUE) {
  rooms_booking_delete_multiple(array(
    $booking->booking_id,
  ), $delete_line_item);
}