function bat_event_types_ids in Booking and Availability Management Tools for Drupal 7
Same name and namespace in other branches
- 8 modules/bat_event/bat_event.module \bat_event_types_ids()
Helper function to easily get event types in an array for use in forms, etc.
Return value
array An array of event types keyed by type id and labels
1 call to bat_event_types_ids()
- bat_calendar_reference_field_settings_form in modules/
bat_calendar_reference/ bat_calendar_reference.module - Implements hook_field_settings_form().
File
- modules/
bat_event/ bat_event.module, line 801 - Manage Events - Events store the EventValue of a Unit over a period of time.
Code
function bat_event_types_ids() {
$event_types = array();
$types = bat_event_get_types();
foreach ($types as $type) {
$event_types[$type->id] = $type->label;
}
return $event_types;
}