You are here

function rooms_unit_state_options in Rooms - Drupal Booking for Hotels, B&Bs and Vacation Rentals 7

Helper function to generate a list of available unit states for select lists.

Return value

array Array of available unit states keyed by id.

5 calls to rooms_unit_state_options()
rooms_availability_ajax_event_status_change in modules/rooms_availability/rooms_availability.module
The callback for the change_event_status widget of the event manager form.
rooms_availability_event_manager_form in modules/rooms_availability/rooms_availability.module
The Event Manager Form.
rooms_availability_update_status_form in modules/rooms_availability/rooms_availability.module
Form to manage the availability for specific month.
rooms_unit_edit_form in modules/rooms_unit/rooms_unit.admin.inc
Form callback: create or edit a unit.
update_availability_calendar_form in modules/rooms_availability/rooms_availability.module
A basic form that allows us to update the state of the calendar.

File

modules/rooms_unit/rooms_unit.module, line 686
Manage units - Units are things that can be booked on a nightly basis (e.g. rooms - but also villas bungalows, etc).

Code

function rooms_unit_state_options() {
  return array(
    ROOMS_NOT_AVAILABLE => t('Unavailable'),
    ROOMS_AVAILABLE => t('Available'),
    ROOMS_ON_REQUEST => t('On Request'),
    ROOMS_ANON_BOOKED => t('Anonymous Booking'),
  );
}