You are here

function merci_record_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_record_status()
  2. 6 merci.module \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
Render the field.
merci_handler_filter_merci_reservation_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.
merci_validate_status in includes/api.inc
merci_view in ./merci.module
Implementation of hook_view().

File

includes/api.inc, line 785
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('Confirmed'),
    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_NO_SHOW => t('No Show'),
  );
  if (isset($code)) {
    return $types[$code];
  }
  else {
    return $types;
  }
}