You are here

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

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

Return the name of a type 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_item_status()
merci_form_alter in ./merci.module
Implementation of hook_form_alter().
merci_handler_field_merci_bucket_resource_node_default_availability::render in handlers/merci_handler_field.inc
merci_handler_field_merci_node_type_status::render in handlers/merci_handler_field.inc
merci_handler_filter_merci_bucket_resource_node_default_availability::get_value_options in handlers/merci_handler_filter_in_operator.inc
merci_handler_filter_merci_node_type_status::get_value_options in handlers/merci_handler_filter_in_operator.inc

File

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

Code

function merci_item_status($code = NULL) {
  $statuses = array(
    MERCI_AVA_F => t('Available'),
    MERCI_UNA_F => t('Unavailable'),
    MERCI_AVA_S => t('Strictly Available'),
    MERCI_UNA_S => t('No Longer in Inventory'),
  );
  if (isset($code)) {
    return $statuses[$code];
  }
  else {
    return $statuses;
  }
}