function activity_token_list in Activity 6
Same name and namespace in other branches
- 5.4 activity.module \activity_token_list()
- 5.3 activity.module \activity_token_list()
- 6.2 activity.module \activity_token_list()
Token module integration. Defines available default tokens.
File
- ./
activity.module, line 984 - activity.module
Code
function activity_token_list($type = 'all') {
if ($type == 'activity') {
$tokens = array(
'activity' => array(),
);
$tokens['activity'] = array(
'author-uid' => t('User Id of the person who initiated the activity'),
'author' => t('Themed username of the person who initiated the activity (used for "author" role)'),
'author-all' => t('Themed username of the person who initiated the activity (used for "all" role)'),
'author-name' => t('Plain text username of the person who initiated the activity'),
'author-picture' => t('The user picture of the person who initiated the activity'),
'operation' => t('The verb of the operation that took place, eg. "create", "update", "delete"'),
'time-small' => t('Date and time in small format: @example', array(
'@example' => format_date(time(), 'small'),
)),
'time-medium' => t('Date and time in medium format: @example', array(
'@example' => format_date(time(), 'medium'),
)),
'time-large' => t('Date and time in large format: @example', array(
'@example' => format_date(time(), 'large'),
)),
'time-ago' => t('How long ago did this happen? Example: %time-ago', array(
'%time-ago' => format_interval(time() - 60 * 60 * 36),
)),
);
return $tokens;
}
}