function bat_event_get_matching_units in Booking and Availability Management Tools for Drupal 8
Same name and namespace in other branches
- 7 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:
$valid_name_states:
$type_id:
$event_type:
$intersect:
$drupal_units:
Return value
array
File
- modules/
bat_event/ bat_event.module, line 885 - 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, $drupal_units = []) {
// Instantiate a BAT Calendar.
$calendar = bat_event_get_calendar($type_id, $event_type, $drupal_units);
return bat_event_get_matching_units_from_calendar($calendar, $start_date, $end_date, $valid_name_states, $intersect);
}