function user_activity_token_values in Heartbeat 6.2
Implementation of hook_token_values().
File
- user_activity/
user_activity.rules.inc, line 199
Code
function user_activity_token_values($type, $object = NULL, $options = array()) {
//dsm('user_activity_token_values called with '.$type);
//dsm($object);
//dsm($options);
$values = array();
switch ($type) {
case 'heartbeat_message':
$values['raw'] = $object;
break;
case 'boolean':
$values['1-or-0'] = $object ? '1' : '0';
break;
case 'node':
$values['title-link'] = l($object->title, 'node/' . $object->nid);
break;
case 'user':
$values['user-name-url'] = l($object->name, 'user/' . $object->uid);
$values['user-profile-url'] = l($object->name, 'profile/' . $object->name);
break;
}
//dsm($values);
return $values;
}