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; } /** * Implementation of hook_token_list(). */ function _casetracker_token_list($type = 'all') { if ($type == 'node' || $type == 'all') { $tokens['casetracker']['case_status'] = t('Case Status'); $tokens['casetracker']['case_type'] = t('Case Type'); $tokens['casetracker']['case_priority'] = t('Case Priority'); $tokens['casetracker']['case_assign_to_uid'] = t('Case Assigned to (UID)'); $tokens['casetracker']['case_assign_to'] = t('Case Assigned to (Name)'); return $tokens; } }