You are here

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

Implements hook_entity_delete().

File

modules/rooms_pricing/rooms_pricing.module, line 105
Manages pricing for Bookable Units and displaying dates on the jquery FullCalendar plugin.

Code

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

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