You are here

function appointment_calendar_slot_capacity in Appointment Calendar 7

Same name and namespace in other branches
  1. 8 appointment_calendar.module \appointment_calendar_slot_capacity()

Implements function to fetch Slot Capacity using selected date.

7 calls to appointment_calendar_slot_capacity()
appointment_calendar_date_list_form in ./appointment_calendar_list.inc
Implements hook_form().
appointment_calendar_list_date_form in ./appointment_calendar_edit.inc
Implements hook_form().
appointment_calendar_list_date_form_submit in ./appointment_calendar_edit.inc
Implements hook_form_submit().
appointment_calendar_list_date_form_validate in ./appointment_calendar_edit.inc
Implements hook_form_validate().
appointment_calendar_node_form_validate in ./appointment_calendar.module
Implements hook_form_validate().

... See full list

File

./appointment_calendar.module, line 410
Adds Appointment calendar filtering and displays Availability.

Code

function appointment_calendar_slot_capacity($selected_date) {

  // Fetch Slot capacity.
  $slot_query = db_select('appointment_date', 'ad');
  $slot_query
    ->fields('ad', array(
    'slot_capacity',
  ));
  $slot_query
    ->condition('date', $selected_date);
  $slot_capacity = $slot_query
    ->execute()
    ->fetchField();
  return $slot_capacity;
}