You are here

function bat_event_delete_states_by_type in Booking and Availability Management Tools for Drupal 7

Delete the states associated with $type.

Parameters

string $type:

1 call to bat_event_delete_states_by_type()
BatEventTypeController::delete in modules/bat_event/bat_event.module

File

modules/bat_event/bat_event.module, line 2019
Manage Events - Events store the EventValue of a Unit over a period of time.

Code

function bat_event_delete_states_by_type($type) {
  db_delete('bat_event_state')
    ->condition('event_type', $type)
    ->execute();
  drupal_static_reset('bat_event_get_states');
  drupal_static_reset('bat_event_load_state_by_machine_name');
}