You are here

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

Implements hook_entity_delete().

File

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

Code

function rooms_availability_entity_delete($entity, $type) {
  if ($type == 'rooms_unit') {

    // Remove data related to entity from rooms_availability table.
    db_delete('rooms_availability')
      ->condition('unit_id', $entity->unit_id)
      ->execute();
  }
}