You are here

function merci_item_reservation_status in MERCI (Manage Equipment Reservations, Checkout and Inventory) 7.2

Same name and namespace in other branches
  1. 6.2 includes/api.inc \merci_item_reservation_status()
2 calls to merci_item_reservation_status()
merci_handler_field_merci_reservation_item_node_item_status::render in handlers/merci_handler_field.inc
Render the field.
merci_handler_filter_merci_reservation_item_node_item_status::get_value_options in handlers/merci_handler_filter_in_operator.inc
Child classes should be used to override this function and set the 'value options', unless 'options callback' is defined as a valid function or static public method to generate these values.

File

includes/api.inc, line 763
MERCI - Managed Equipment Reservation Checkout and Inventory

Code

function merci_item_reservation_status($code = NULL) {

  // Item status for reservations.
  $statuses = array(
    MERCI_ITEM_STATUS_AVAILABLE => t('Available'),
    MERCI_ITEM_STATUS_CHECKED_OUT => t('Checked Out'),
  );
  if (isset($code)) {
    return $statuses[$code];
  }
  else {
    return $statuses;
  }
}