You are here

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

Implements hook_uninstall().

File

modules/rooms_unit/rooms_unit.install, line 20
Sets up the base table for our entity and a table to store information about the entity types.

Code

function rooms_unit_uninstall() {
  rooms_description_content_type_uninstall();

  // Delete options field.
  field_delete_field('rooms_booking_unit_options');

  // Delete other rooms fields.
  foreach (_rooms_description_installed_fields() as $field) {
    field_delete_field($field['field_name']);
  }
  $limit = variable_get('field_purge_batch_size', 10);
  field_purge_batch($limit);
}