You are here

function merci_record_status in MERCI (Manage Equipment Reservations, Checkout and Inventory) 6

Same name and namespace in other branches
  1. 6.2 includes/api.inc \merci_record_status()
  2. 7.2 includes/api.inc \merci_record_status()

Return the name of a status code.

Parameters

string|int $code: if int, will return translated name of the code. if NULL, returns array of codes as keys, and translated strings as value

Return value

string|int

5 calls to merci_record_status()
merci_form in ./merci.module
Implementation of hook_form().
merci_handler_field_merci_reservation_status::render in handlers/merci_handler_field.inc
merci_handler_filter_merci_reservation_status::get_value_options in handlers/merci_handler_filter_in_operator.inc
merci_node_validate in ./merci.module
Implementation of hook_validate().
merci_view in ./merci.module
Implementation of hook_view().

File

./merci.module, line 1656
MERCI - Managed Equipment Reservation Checkout and Inventory

Code

function merci_record_status($code = NULL) {
  $types = array(
    MERCI_STATUS_UNCONFIRMED => t('Unconfirmed'),
    MERCI_STATUS_PENDING => t('Pending'),
    MERCI_STATUS_CHECKED_OUT => t('Checked out'),
    MERCI_STATUS_CHECKED_IN => t('Checked in'),
    MERCI_STATUS_CANCELLED => t('Cancelled'),
    MERCI_STATUS_DENIED => t('Denied'),
    MERCI_STATUS_DENIED => t('No Show'),
  );
  if (isset($code)) {
    return $types[$code];
  }
  else {
    return $types;
  }
}