function bat_event_states_get_default in Booking and Availability Management Tools for Drupal 7
Parameters
string $event_type:
Return value
array
File
- modules/
bat_event/ bat_event.module, line 368 - Manage Events - Events store the EventValue of a Unit over a period of time.
Code
function bat_event_states_get_default($event_type) {
$state_id = db_select('bat_event_state', 'n')
->fields('n', array(
'id',
))
->condition('event_type', $event_type)
->condition('default_state', 1)
->execute()
->fetchField();
return bat_event_load_state($state_id);
}