function bat_event_get_matching_units 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_get_matching_units()
Given a date range and a set of valid states it will return all units within the set of valid states.
Parameters
DateTime $start_date:
DateTime $end_date:
array $valid_name_states:
$type_id:
$event_type:
bool $intersect:
bool $use_costraints:
Return value
array|bool
File
- modules/
bat_event/ bat_event.module, line 2405 - Manage Events - Events store the EventValue of a Unit over a period of time.
Code
function bat_event_get_matching_units(DateTime $start_date, DateTime $end_date, $valid_name_states, $type_id, $event_type, $intersect = FALSE, $use_costraints = TRUE) {
// Instantiate a BAT Calendar.
$calendar = bat_event_get_calendar($type_id, $event_type);
return bat_event_get_matching_units_from_calendar($calendar, $start_date, $end_date, $valid_name_states, $intersect, TRUE, $use_costraints);
}