function activity_logger_token_info in Open Social 10.0.x
Same name and namespace in other branches
- 8.9 modules/custom/activity_logger/activity_logger.tokens.inc \activity_logger_token_info()
- 8 modules/custom/activity_logger/activity_logger.tokens.inc \activity_logger_token_info()
- 8.2 modules/custom/activity_logger/activity_logger.tokens.inc \activity_logger_token_info()
- 8.3 modules/custom/activity_logger/activity_logger.tokens.inc \activity_logger_token_info()
- 8.4 modules/custom/activity_logger/activity_logger.tokens.inc \activity_logger_token_info()
- 8.5 modules/custom/activity_logger/activity_logger.tokens.inc \activity_logger_token_info()
- 8.6 modules/custom/activity_logger/activity_logger.tokens.inc \activity_logger_token_info()
- 8.7 modules/custom/activity_logger/activity_logger.tokens.inc \activity_logger_token_info()
- 8.8 modules/custom/activity_logger/activity_logger.tokens.inc \activity_logger_token_info()
- 10.3.x modules/custom/activity_logger/activity_logger.tokens.inc \activity_logger_token_info()
- 10.1.x modules/custom/activity_logger/activity_logger.tokens.inc \activity_logger_token_info()
- 10.2.x modules/custom/activity_logger/activity_logger.tokens.inc \activity_logger_token_info()
Implements hook_token_info().
File
- modules/
custom/ activity_logger/ activity_logger.tokens.inc, line 19 - Builds placeholder replacement tokens for message-related data.
Code
function activity_logger_token_info() {
$type = [
'name' => t('Activity tokens'),
'description' => t('Tokens from the activity logger module.'),
'needs-data' => 'message',
];
$message['node-title'] = [
'name' => t("Node title"),
'description' => t("The related node title."),
];
$message['gtitle'] = [
'name' => t("Groups title"),
'description' => t("The related group title."),
];
$message['gurl'] = [
'name' => t("Groups url"),
'description' => t("The related group url."),
];
$message['pmt-url'] = [
'name' => t("Private Message Thread url"),
'description' => t("The URL of the private message thread group url."),
];
$message['recipient-user'] = [
'name' => t('Recipient user'),
'description' => t('The recipient user.'),
'type' => 'user',
];
$message['recipient-user-url'] = [
'name' => t("Recipient user url"),
'description' => t("The recipient user url."),
];
return [
'types' => [
'message' => $type,
],
'tokens' => [
'message' => $message,
],
];
}