function _casetracker_token_values in Case Tracker 6
Implementation of hook_token_values().
1 call to _casetracker_token_values()
- casetracker_token_values in ./
casetracker.module - Implementation of hook_token_values().
File
- ./
casetracker.token.inc, line 12 - Token implementation for Casetracker
Code
function _casetracker_token_values($type, $object = NULL) {
$values = array();
if ($type == 'node' && casetracker_is_case($object)) {
$values['case_status'] = casetracker_case_state_load($object->casetracker->case_status_id, 'status');
$values['case_type'] = casetracker_case_state_load($object->casetracker->case_type_id, 'type');
$values['case_priority'] = casetracker_case_state_load($object->casetracker->case_priority_id, 'priority');
$values['case_assign_to_uid'] = $object->casetracker->assign_to;
$assignedUser = user_load($object->casetracker->assign_to);
$values['case_assign_to'] = $assignedUser->name;
}
return $values;
}