function simplenews_rules_rules_action_info in Simplenews 7
Same name and namespace in other branches
- 8.2 simplenews_rules/simplenews_rules.rules.inc \simplenews_rules_rules_action_info()
- 8 simplenews_rules/simplenews_rules.rules.inc \simplenews_rules_rules_action_info()
- 7.2 simplenews_rules/simplenews_rules.rules.inc \simplenews_rules_rules_action_info()
- 3.x simplenews_rules/simplenews_rules.rules.inc \simplenews_rules_rules_action_info()
Implements hook_rules_action_info().
File
- simplenews_rules/
simplenews_rules.rules.inc, line 14 - Rules hooks for the Simplenews newsletter module.
Code
function simplenews_rules_rules_action_info() {
return array(
'simplenews_rules_action_send' => array(
'label' => t('Send newsletter'),
'group' => t('Simplenews'),
'parameter' => array(
'node' => array(
'type' => 'node',
'label' => t('The newsletter node to be sent.'),
'description' => t('The newsletter node that should be sent.'),
),
),
),
'simplenews_rules_action_subscribe' => array(
'label' => t('Subscribe an e-mail adress to a newsletter'),
'group' => t('Simplenews'),
'named parameter' => TRUE,
'parameter' => array(
'mail' => array(
'type' => 'text',
'label' => t('E-mail'),
'description' => t('The e-mail address that should be subscribed.'),
),
'tid' => array(
'type' => 'integer',
'label' => t('Simplenews category'),
'descrption' => t('For which newsletter category the subscription should happen.'),
'options list' => 'simplenews_category_list',
),
'confirmation' => array(
'type' => 'integer',
'label' => t('Confirmation required'),
'description' => t('Select if a confirmation is required. Default uses the default setting from the chosen newsletter category.'),
'options list' => 'simplenews_rules_confirmation_list',
'default value' => SIMPLENEWS_RULES_CONFIRMATION_DEFAULT,
),
'source' => array(
'type' => 'string',
'label' => t('Source'),
'description' => t('A string to identify the source of this subscription'),
'optional' => TRUE,
),
'source' => array(
'type' => 'text',
'label' => t('Source'),
'description' => t('A string to identify the source of this subscription'),
'optional' => TRUE,
'default value' => 'rules',
),
'language' => array(
'type' => 'token',
'label' => t('Language'),
'description' => t('If specified, the language to use for the subscription. Defaults to the default language.'),
'options list' => 'entity_metadata_language_list',
'optional' => TRUE,
'default value' => LANGUAGE_NONE,
),
),
),
'simplenews_rules_action_unsubscribe' => array(
'label' => t('Unsubscribe an e-mail adress from a newsletter'),
'group' => t('Simplenews'),
'named parameter' => TRUE,
'parameter' => array(
'mail' => array(
'type' => 'text',
'label' => t('E-mail'),
'description' => t('The e-mail address that should be unsubscribed.'),
),
'tid' => array(
'type' => 'integer',
'label' => t('Simplenews category'),
'description' => t('For which newsletter category the unsubscription should happen.'),
'options list' => 'simplenews_category_list',
),
'confirmation' => array(
'type' => 'integer',
'label' => t('Confirmation required'),
'description' => t('Select if a confirmation is required. Default uses the default setting from the chosen newsletter category.'),
'options list' => 'simplenews_rules_confirmation_list',
'default value' => SIMPLENEWS_RULES_CONFIRMATION_DEFAULT,
),
'source' => array(
'type' => 'text',
'label' => t('Source'),
'description' => t('A string to identify the source of this subscription'),
'optional' => TRUE,
'default value' => 'rules',
),
'language' => array(
'type' => 'token',
'label' => t('Language'),
'description' => t('If specified, the language to use for the subscription. Defaults to the default language.'),
'options list' => 'entity_metadata_language_list',
'optional' => TRUE,
'default value' => LANGUAGE_NONE,
),
),
),
'simplenews_rules_action_subscription_delete' => array(
'label' => t('Delete an e-mail address from a newsletter'),
'group' => t('Simplenews'),
'named parameter' => TRUE,
'parameter' => array(
'mail' => array(
'type' => 'text',
'label' => t('E-mail'),
'description' => t('The e-mail address that should be permanently deleted from the newsletter. Note, use the unsubscribe action to temporarily unsubscribe an email address.'),
),
'tid' => array(
'type' => 'integer',
'label' => t('Simplenews category'),
'description' => t('For which newsletter category the delete should happen.'),
'options list' => 'simplenews_category_list',
),
),
),
'simplenews_rules_action_subscriber_delete' => array(
'label' => t('Delete an e-mail address from all newsletters'),
'group' => t('Simplenews'),
'named parameter' => TRUE,
'parameter' => array(
'mail' => array(
'type' => 'text',
'label' => t('E-mail'),
'description' => t('The e-mail address that should be permanently deleted from all newsletters. Note, use the unsubscribe action to temporarily unsubscribe an email address.'),
),
),
),
);
}