function merci_item_status in MERCI (Manage Equipment Reservations, Checkout and Inventory) 6.2
Same name and namespace in other branches
- 6 merci.module \merci_item_status()
- 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
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 - 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
3 string references to 'merci_item_status'
- merci_handler_field_merci_reservation_item_node_item_status::construct in handlers/
merci_handler_field.inc - merci_schema in ./
merci.install - Implements hook_schema().
- merci_views_data in ./
merci.views.inc - Implements hook_views_data().
File
- includes/
api.inc, line 751 - 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;
}
}