You are here

function merci_item_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_status()
  2. 6 merci.module \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

4 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
Render the field.
merci_handler_filter_merci_bucket_resource_node_default_availability::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_handler_filter_merci_node_type_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.
3 string references to 'merci_item_status'
merci_handler_field_merci_reservation_item_node_item_status::construct in handlers/merci_handler_field.inc
Construct a new field handler.
merci_schema in ./merci.install
Implements hook_schema().
merci_views_data in ./merci.views.inc
Implements hook_views_data().

File

includes/api.inc, line 747
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_T => t('Template Only'),
    MERCI_UNA_S => t('No Longer in Inventory'),
  );
  if (isset($code)) {
    return $statuses[$code];
  }
  else {
    return $statuses;
  }
}