You are here

function activity_creator_token_info in Open Social 10.1.x

Same name and namespace in other branches
  1. 8.9 modules/custom/activity_creator/activity_creator.tokens.inc \activity_creator_token_info()
  2. 8 modules/custom/activity_creator/activity_creator.tokens.inc \activity_creator_token_info()
  3. 8.2 modules/custom/activity_creator/activity_creator.tokens.inc \activity_creator_token_info()
  4. 8.3 modules/custom/activity_creator/activity_creator.tokens.inc \activity_creator_token_info()
  5. 8.4 modules/custom/activity_creator/activity_creator.tokens.inc \activity_creator_token_info()
  6. 8.5 modules/custom/activity_creator/activity_creator.tokens.inc \activity_creator_token_info()
  7. 8.6 modules/custom/activity_creator/activity_creator.tokens.inc \activity_creator_token_info()
  8. 8.7 modules/custom/activity_creator/activity_creator.tokens.inc \activity_creator_token_info()
  9. 8.8 modules/custom/activity_creator/activity_creator.tokens.inc \activity_creator_token_info()
  10. 10.3.x modules/custom/activity_creator/activity_creator.tokens.inc \activity_creator_token_info()
  11. 10.0.x modules/custom/activity_creator/activity_creator.tokens.inc \activity_creator_token_info()
  12. 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 14
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,
    ],
  ];
}