function twilio_rules_action_info in Twilio 7
Implements hook_rules_action_info().
File
- ./
twilio.rules.inc, line 125 - Rules module integration
Code
function twilio_rules_action_info() {
$defaults = array(
'group' => t('Twilio'),
'module' => 'twilio',
);
$actions['twilio_send_sms_to_user'] = $defaults + array(
'label' => t('Send an SMS to a user'),
'base' => 'twilio_rules_action_send_sms_to_user',
'parameter' => array(
'account' => array(
'type' => 'user',
'label' => t('User'),
'save' => TRUE,
),
'message' => array(
'type' => 'text',
'label' => t('Message'),
),
'media' => array(
'type' => 'text',
'optional' => TRUE,
'label' => t('Media path'),
),
),
);
$actions['twilio_send_sms_to_all_users'] = $defaults + array(
'label' => t('Send an SMS to all users'),
'base' => 'twilio_rules_action_send_sms_to_all_users',
'parameter' => array(
'message' => array(
'type' => 'text',
'label' => t('Message'),
),
'media' => array(
'type' => 'text',
'optional' => TRUE,
'label' => t('Media path'),
),
),
);
$actions['twilio_send_sms_to_number'] = $defaults + array(
'label' => t('Send an SMS to a number'),
'base' => 'twilio_rules_action_send_sms_to_number',
'parameter' => array(
'country' => array(
'type' => 'text',
'label' => t('Country code'),
'options list' => 'twilio_country_codes',
),
'number' => array(
'type' => 'text',
'label' => t('Number'),
),
'message' => array(
'type' => 'text',
'label' => t('Message'),
),
'media' => array(
'type' => 'text',
'optional' => TRUE,
'label' => t('Media path'),
),
),
);
return $actions;
}