You are here

function redhen_contact_token_info in RedHen CRM 8

Implements hook_token_info().

File

modules/redhen_contact/redhen_contact.module, line 135
Contains redhen_contact.module..

Code

function redhen_contact_token_info() {
  $type = [
    'name' => t('Contact'),
    'description' => t('Tokens related to an individual Contacts.'),
    'needs-data' => 'redhen_contact',
  ];
  $redhen_contact['id'] = [
    'name' => t('Contact ID'),
    'description' => t('The unique ID of the Contact.'),
  ];
  $redhen_contact['name'] = [
    'name' => t('Contact Name'),
    'description' => t('The name of the Contact.'),
  ];
  $redhen_contact['type'] = [
    'name' => t('Contact Type'),
    'description' => t('The type (bundle) of the Contact.'),
  ];
  $redhen_contact['status'] = [
    'name' => t('Contact Status'),
    'description' => t('The status of the Contact.'),
  ];
  $redhen_contact['created'] = [
    'name' => t('Contact Created'),
    'description' => t('The timestamp the Contact was created.'),
  ];
  return [
    'types' => [
      'redhen_contact' => $type,
    ],
    'tokens' => [
      'redhen_contact' => $redhen_contact,
    ],
  ];
}