class merci_handler_field_merci_bucket_resource_node_sub_type in MERCI (Manage Equipment Reservations, Checkout and Inventory) 6
Same name and namespace in other branches
- 6.2 handlers/merci_handler_field.inc \merci_handler_field_merci_bucket_resource_node_sub_type
- 7.2 handlers/merci_handler_field.inc \merci_handler_field_merci_bucket_resource_node_sub_type
Bucket|Resource sub type.
Hierarchy
- class \merci_handler_field_merci_bucket_resource_node_sub_type extends \views_handler_field
Expanded class hierarchy of merci_handler_field_merci_bucket_resource_node_sub_type
1 string reference to 'merci_handler_field_merci_bucket_resource_node_sub_type'
- merci_views_data in ./
merci.views.inc - Implementation of hook_views_data().
File
- handlers/
merci_handler_field.inc, line 105
View source
class merci_handler_field_merci_bucket_resource_node_sub_type extends views_handler_field {
function construct() {
parent::construct();
$this->additional_fields['sub_type'] = 'sub_type';
}
function query() {
$this
->ensure_my_table();
$this
->add_additional_fields();
}
function render($values) {
parent::render($values);
$sub_type = $values->{$this->aliases['sub_type']};
switch ($sub_type) {
case MERCI_SUB_TYPE_ITEM:
return t('Item');
break;
case MERCI_SUB_TYPE_RESERVATION:
return t('Reservation placeholder');
break;
default:
return t('Unknown');
break;
}
}
}