function availability_calendars_get_states in Availability Calendars 6.2
Same name and namespace in other branches
- 7.2 availability_calendars.module \availability_calendars_get_states()
Returns an array of records for all states.
Return value
array array of records keyed by the class
9 calls to availability_calendars_get_states()
- AvailabilityCalendarsCssGenerator::createStatesCss in ./
availability_calendars.styles.inc - AvailabilityCalendarsStylesFormBuilder::fieldsetStates in ./
availability_calendars.styles.inc - Helper method to return the fieldset for the states styles
- AvailabilityCalendarsStylesFormValidator::fieldsetStates in ./
availability_calendars.styles.inc - availability_calendars_admin_settings in ./
availability_calendars.admin.inc - Retrieve form callback for the admin/settings/availability-calendars/settings page.
- availability_calendars_get_settings in ./
availability_calendars.inc - Utility function to get settings related to nodes or administration.
File
- ./
availability_calendars.inc, line 111 - General helper methods for Availability Calendars, like database access and settings.
Code
function availability_calendars_get_states() {
static $states = NULL;
if ($states === NULL) {
$states = array();
$result = db_query("SELECT * FROM {availability_calendars_states} ORDER BY weight");
while ($row = db_fetch_array($result)) {
$states[$row['class']] = $row;
}
}
return $states;
}