function slack_rules_action_info in Slack 7
Same name and namespace in other branches
- 6 slack.rules.inc \slack_rules_action_info()
Implements hook_rules_action_info().
File
- ./
slack.rules.inc, line 11 - Slack integration module rules functions.
Code
function slack_rules_action_info() {
$actions = array();
$actions['slack_send_message'] = array(
'base' => 'slack_rules_send_message_action',
'label' => t('Slack send message'),
'group' => t('Slack'),
'parameter' => array(
'webhook_url' => array(
'type' => 'text',
'label' => t('Webhook URL'),
'description' => t("It will be using a webhook_url from slack module settings, if you don't enter it here."),
'optional' => TRUE,
),
'channel' => array(
'type' => 'text',
'label' => t('Channel'),
'description' => t("It will be using a channel from slack module settings, if you don't enter channel here."),
'optional' => TRUE,
),
'username' => array(
'type' => 'text',
'label' => t('Username'),
'description' => t("It will be using a username from slack module settings, if you don't enter username here."),
'optional' => TRUE,
),
'message' => array(
'type' => 'text',
'label' => t('Sending message'),
),
'type_token' => array(
'type' => 'text',
'label' => t('Icon type'),
'description' => t("Select needed token for define slackbot icon type, or select nothing to use default"),
'optional' => TRUE,
),
'emoji' => array(
'type' => 'text',
'label' => t('Emoji code'),
'description' => t("It will be using a emoji code from slack module settings, if you don't enter username here."),
'optional' => TRUE,
),
'icon' => array(
'type' => 'text',
'label' => t('Icon url'),
'description' => t("It will be using a icon url from slack module settings, if you don't enter username here."),
'optional' => TRUE,
),
'color' => array(
'type' => 'text',
'label' => t('Message color'),
'optional' => TRUE,
),
'pretext' => array(
'type' => 'text',
'label' => t('Message pretext'),
'optional' => TRUE,
),
'title' => array(
'type' => 'text',
'label' => t('Message title'),
'optional' => TRUE,
),
'title_link ' => array(
'type' => 'text',
'label' => t('Link for message title'),
'optional' => TRUE,
),
'image_url' => array(
'type' => 'text',
'label' => t('Image url for attachment'),
'optional' => TRUE,
),
'author_name' => array(
'type' => 'text',
'label' => t('Author name for attachment'),
'optional' => TRUE,
),
'author_link' => array(
'type' => 'text',
'label' => t('Author link for attachment'),
'optional' => TRUE,
),
'author_icon' => array(
'type' => 'text',
'label' => t('Author icon for attachment'),
'optional' => TRUE,
),
'footer' => array(
'type' => 'text',
'label' => t('Footer for attachment'),
'optional' => TRUE,
),
'footer_icon' => array(
'type' => 'text',
'label' => t('Footer icon for attachment'),
'optional' => TRUE,
),
'ts' => array(
'type' => 'text',
'label' => t('Time stamp for attachment'),
'optional' => TRUE,
),
),
);
return $actions;
}