You are here

function simplenews_rules_rules_event_info in Simplenews 3.x

Same name and namespace in other branches
  1. 8.2 simplenews_rules/simplenews_rules.rules.inc \simplenews_rules_rules_event_info()
  2. 8 simplenews_rules/simplenews_rules.rules.inc \simplenews_rules_rules_event_info()
  3. 7.2 simplenews_rules/simplenews_rules.rules.inc \simplenews_rules_rules_event_info()
  4. 7 simplenews_rules/simplenews_rules.rules.inc \simplenews_rules_rules_event_info()

Implements hook_event_info().

File

simplenews_rules/simplenews_rules.rules.inc, line 150
Rules hooks for the Simplenews newsletter module.

Code

function simplenews_rules_rules_event_info() {
  return array(
    'simplenews_rules_event_subscribe' => array(
      'label' => t('A user has been subscribed'),
      'group' => t('Simplenews'),
      'variables' => array(
        'mail' => array(
          'type' => 'text',
          'label' => t('E-Mail'),
          'description' => t('The e-mail address that has been subscribed.'),
        ),
        'newsletter' => array(
          'type' => 'simplenews_newsletter',
          'label' => t('Simplenews newsletter'),
          'descrption' => t('For which newsletter the subscription should happen.'),
        ),
      ),
    ),
    'simplenews_rules_event_unsubscribe' => array(
      'label' => t('A user has been unsubscribed'),
      'group' => t('Simplenews'),
      'variables' => array(
        'mail' => array(
          'type' => 'text',
          'label' => t('E-mail'),
          'description' => t('The e-mail address that has been subscribed.'),
        ),
        'newsletter' => array(
          'type' => 'simplenews_newsletter',
          'label' => t('Simplenews newsletter'),
          'descrption' => t('For which newsletter the subscription should happen.'),
        ),
      ),
    ),
  );
}