You are here

function twilio_token_info in Twilio 7

Implements hook_token_info().

File

./twilio.module, line 380
Twilio module

Code

function twilio_token_info() {
  $info['types']['sms'] = array(
    'name' => t('SMS'),
    'description' => t('Tokens related to an SMS message.'),
  );
  $info['types']['voice'] = array(
    'name' => t('Voice call'),
    'description' => t('Tokens related to a voice call.'),
  );

  // Tokens for an SMS message.
  $info['tokens']['sms']['number'] = array(
    'name' => t("Number"),
    'description' => t("The phone number of the incoming SMS."),
  );
  $info['tokens']['sms']['number_twilio'] = array(
    'name' => t("Twilio Number"),
    'description' => t("The Twilio number that received the message."),
  );
  $info['tokens']['sms']['message'] = array(
    'name' => t("Message"),
    'description' => t("The message of the incoming SMS."),
  );
  $info['tokens']['sms']['media'] = array(
    'name' => t("Media"),
    'description' => t("The media attached to the incoming SMS."),
  );

  // Tokens for a voice call.
  $info['tokens']['voice']['number'] = array(
    'name' => t("Number"),
    'description' => t("The phone number of the incoming voice call."),
  );
  $info['tokens']['voice']['number_twilio'] = array(
    'name' => t("Twilio Number"),
    'description' => t("The Twilio number that received the voice call."),
  );
  return $info;
}