You are here

public function UnitCalendarInterface::stateAvailability in Rooms - Drupal Booking for Hotels, B&Bs and Vacation Rentals 7

Given a set of states (e.g. the desired states to accept a booking) we compare against the states the unit is actually in.

If the unit is in any state that is not in the list of desired states it means there is a mismatch - hence no availability.

Parameters

DateTime $start_date: The starting date for the search.

DateTime $end_date: The end date for the search.

array $states: The states we are interested in.

Return value

bool Returns true if the date range provided does not have states other than the ones we are interested in

1 method overrides UnitCalendarInterface::stateAvailability()
UnitCalendar::stateAvailability in modules/rooms_availability/includes/rooms_availability.unit_calendar.inc
Given a set of states (e.g. the desired states to accept a booking) we compare against the states the unit is actually in.

File

modules/rooms_availability/includes/rooms_availability.unit_calendar_interface.inc, line 57
Handles querying and updating the availability information relative to a single bookable unit.

Class

UnitCalendarInterface
@file Handles querying and updating the availability information relative to a single bookable unit.

Code

public function stateAvailability(DateTime $start_date, DateTime $end_date, array $states = array());