function sms_user_rules_action_info in SMS Framework 7
Same name and namespace in other branches
- 6.2 modules/sms_user/sms_user.rules.inc \sms_user_rules_action_info()
Implements hook_rules_action_info().
File
- modules/
sms_user/ sms_user.rules.inc, line 42 - SMS User Rules Implementation.
Code
function sms_user_rules_action_info() {
return array(
'sms_action_user_send' => array(
'label' => t('Send SMS message to user'),
'group' => t('SMS'),
'parameter' => array(
'user' => array(
'type' => 'user',
'label' => t('User'),
),
'message' => array(
'type' => 'text',
'label' => t('Message'),
),
),
),
'sms_action_match_user' => array(
'label' => t('Match mobile number to user'),
'group' => t('SMS'),
'parameter' => array(
'number' => array(
'type' => 'text',
'label' => t('Phone number'),
),
),
'new variables' => array(
'user_loaded' => array(
'type' => 'user',
'label' => t('Loaded user'),
),
),
),
// Actions for opting out and opting in for sms messages from the site.
'sms_action_opt_out' => array(
'label' => t('Let user opt out of sms messages from the site via SMS.'),
'group' => t('SMS'),
'arguments' => array(
'sms:select' => array(
'label' => t('SMS Message'),
'description' => t('The SMS message and metadata.'),
'type' => 'sms',
),
),
),
'sms_action_opt_in' => array(
'label' => t('Let user opt in for sms messages from the site via SMS.'),
'group' => t('SMS'),
'arguments' => array(
'sms:select' => array(
'label' => t('SMS Message'),
'description' => t('The SMS message and metadata.'),
'type' => 'sms',
),
),
),
);
}