You are here

function slack_token_info in Slack 7

Implements hook_token_info().

File

./slack.tokens.inc, line 11
Token integration.

Code

function slack_token_info() {
  $types = array(
    'name' => t('Slack'),
    'description' => 'Slack tokens',
  );
  $tokens['slack-channel'] = array(
    'name' => t('Channel'),
    'description' => t('Name of channel.'),
    'type' => 'text',
    'dynamic' => TRUE,
    'global_types' => TRUE,
  );
  $tokens['slack-default-webhook-url'] = array(
    'name' => t('Webhook URL'),
    'description' => t('Webhook URL which defined on settings page.'),
    'type' => 'text',
    'dynamic' => TRUE,
    'global_types' => TRUE,
  );
  $tokens['slack-icon-url'] = array(
    'name' => t('Icon URL'),
    'description' => t('Absolute Url to image you would like to use for your Slackbot.'),
    'type' => 'text',
    'dynamic' => TRUE,
    'global_types' => TRUE,
  );
  $tokens['slack-icon-emoji'] = array(
    'name' => t('Emoji code'),
    'description' => t('Emoji code you would like to use for your Slackbot.'),
    'type' => 'text',
    'dynamic' => TRUE,
    'global_types' => TRUE,
  );
  $tokens['slack-username'] = array(
    'name' => t('Username'),
    'description' => t('Default username for your Slackbot.'),
    'type' => 'text',
    'dynamic' => TRUE,
    'global_types' => TRUE,
  );
  return array(
    'types' => array(
      'slack' => $types,
    ),
    'tokens' => array(
      'slack' => $tokens,
    ),
  );
}