You are here

function date_repeat_entity_uninstall in Date Repeat Entity 7.2

Implements hook_uninstall().

File

./date_repeat_entity.install, line 37
Install, update and uninstall functions for the Date Repeat Entity module.

Code

function date_repeat_entity_uninstall() {

  // Remove variable.
  variable_del('date_repeat_entity_bundles_available');

  // Explicitly load module file (which will no longer be available
  // at this stage.  The module file is where field names are defined.
  drupal_load('module', 'date_repeat_entity');

  // Remove uuid field from application.
  $field_master_uuid = field_info_field(DATE_REPEAT_ENTITY_FIELD_MASTER_UUID);
  if ($field_master_uuid) {
    field_delete_field($field_master_uuid['field_name']);
  }

  // Remove clone state field from application.
  $field_clone_state = field_info_field(DATE_REPEAT_ENTITY_FIELD_CLONE_STATE);
  if ($field_clone_state) {
    field_delete_field($field_clone_state['field_name']);
  }
}