You are here

function mailchimp_lists_rules_action_info in Mailchimp 7.2

Same name and namespace in other branches
  1. 8 modules/mailchimp_lists/mailchimp_lists.rules.inc \mailchimp_lists_rules_action_info()
  2. 7.5 modules/mailchimp_lists/mailchimp_lists.rules.inc \mailchimp_lists_rules_action_info()
  3. 7.3 modules/mailchimp_lists/mailchimp_lists.rules.inc \mailchimp_lists_rules_action_info()
  4. 7.4 modules/mailchimp_lists/mailchimp_lists.rules.inc \mailchimp_lists_rules_action_info()
  5. 2.x modules/mailchimp_lists/mailchimp_lists.rules.inc \mailchimp_lists_rules_action_info()

Implements hook_rules_action_info().

File

modules/mailchimp_lists/mailchimp_lists.rules.inc, line 44
Rules integration for the mailchimp module.

Code

function mailchimp_lists_rules_action_info() {
  $items['mailchimp_lists_user_subscribe_list'] = array(
    'label' => t('Subscribe user to a mailchimp list'),
    'parameter' => array(
      'account' => array(
        'type' => 'user',
        'label' => t('User'),
        'description' => t('The user to subscribe to a list.'),
      ),
      'list' => array(
        'type' => 'mailchimp_list',
        'label' => t('Mailchimp list'),
        'default mode' => 'input',
      ),
    ),
    'group' => t('Mailchimp'),
    'access callback' => 'mailchimp_lists_rules_access_callback',
    'base' => 'mailchimp_lists_rules_action_user_subscribe_list',
  );
  $items['mailchimp_lists_unsubscribe_list'] = array(
    'label' => t('Unsubscribe mail address from a mailchimp list'),
    'parameter' => array(
      'mail' => array(
        'type' => 'text',
        'label' => t('E-Mail address'),
        'description' => t('The mail address to unsubscribe from the given list.'),
        'default mode' => 'selector',
      ),
      'list' => array(
        'type' => 'mailchimp_list',
        'label' => t('Mailchimp list'),
        'default mode' => 'input',
      ),
    ),
    'group' => t('Mailchimp'),
    'access callback' => 'mailchimp_lists_rules_access_callback',
    'base' => 'mailchimp_lists_rules_action_unsubscribe_list',
  );
  return $items;
}