function simplenews_rules_rules_action_info in Simplenews 8
Same name and namespace in other branches
- 8.2 simplenews_rules/simplenews_rules.rules.inc \simplenews_rules_rules_action_info()
- 7.2 simplenews_rules/simplenews_rules.rules.inc \simplenews_rules_rules_action_info()
- 7 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.'),
),
'newsletter_id' => array(
'type' => 'integer',
'label' => t('Simplenews newsletter'),
'descrption' => t('For which newsletter the subscription should happen.'),
'options list' => 'simplenews_newsletter_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.'),
'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.'),
),
'newsletter' => array(
'type' => 'simplenews_newsletter',
'label' => t('Simplenews newsletter'),
'descrption' => t('For which newsletter the subscription should happen.'),
'options list' => 'simplenews_newsletter_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.'),
'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.'),
),
'newsletter' => array(
'type' => 'simplenews_newsletter',
'label' => t('Simplenews newsletter'),
'descrption' => t('For which newsletter the subscription should happen.'),
),
),
),
'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.'),
),
),
),
);
}