function activity_creator_token_info in Open Social 8
Same name and namespace in other branches
- 8.9 modules/custom/activity_creator/activity_creator.tokens.inc \activity_creator_token_info()
- 8.2 modules/custom/activity_creator/activity_creator.tokens.inc \activity_creator_token_info()
- 8.3 modules/custom/activity_creator/activity_creator.tokens.inc \activity_creator_token_info()
- 8.4 modules/custom/activity_creator/activity_creator.tokens.inc \activity_creator_token_info()
- 8.5 modules/custom/activity_creator/activity_creator.tokens.inc \activity_creator_token_info()
- 8.6 modules/custom/activity_creator/activity_creator.tokens.inc \activity_creator_token_info()
- 8.7 modules/custom/activity_creator/activity_creator.tokens.inc \activity_creator_token_info()
- 8.8 modules/custom/activity_creator/activity_creator.tokens.inc \activity_creator_token_info()
- 10.3.x modules/custom/activity_creator/activity_creator.tokens.inc \activity_creator_token_info()
- 10.0.x modules/custom/activity_creator/activity_creator.tokens.inc \activity_creator_token_info()
- 10.1.x modules/custom/activity_creator/activity_creator.tokens.inc \activity_creator_token_info()
- 10.2.x modules/custom/activity_creator/activity_creator.tokens.inc \activity_creator_token_info()
Implements hook_token_info().
File
- modules/
custom/ activity_creator/ activity_creator.tokens.inc, line 13 - Builds placeholder replacement tokens for message-related data.
Code
function activity_creator_token_info() {
$type = [
'name' => t('Activity Entity tokens'),
'description' => t('Tokens from the activity creator module.'),
'needs-data' => 'activity',
];
$activity['field_activity_recipient_user_display_name'] = [
'name' => t("Recipient user entity display name"),
'description' => t("The recipient user entity display name."),
];
return [
'types' => [
'activity' => $type,
],
'tokens' => [
'activity' => $activity,
],
];
}