protected function UnitCalendar::preparePartialMonthArray in Rooms - Drupal Booking for Hotels, B&Bs and Vacation Rentals 7
Given an event it prepares a partial array covering just the days for which the event is involved
Parameters
RoomsEventInterface $event: The event to process.
Return value
array The days of the month states processed array.
Overrides RoomsCalendar::preparePartialMonthArray
File
- modules/
rooms_availability/ includes/ rooms_availability.unit_calendar.inc, line 418 - Class UnitCalendar Handles querying and updating the availability information relative to a single bookable unit.
Class
- UnitCalendar
- @file Class UnitCalendar Handles querying and updating the availability information relative to a single bookable unit.
Code
protected function preparePartialMonthArray(RoomsEventInterface $event) {
$days = array();
for ($i = $event
->startDay(); $i <= $event
->endDay(); $i++) {
$days['d' . $i] = $event->id;
}
return $days;
}