You are here

function activity_creator_token_info in Open Social 8.9

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