You are here

function simplenews_action_info in Simplenews 6

Same name and namespace in other branches
  1. 6.2 simplenews_action/simplenews_action.module \simplenews_action_info()

File

simplenews_action/simplenews_action.module, line 13
simplenews_action.inc Provide actions for simplenews.

Code

function simplenews_action_info() {
  return array(
    'simplenews_send_newsletter_action' => array(
      'description' => t('Send single simplenews newsletter'),
      'type' => 'simplenews',
      'configurable' => TRUE,
      'hooks' => array(
        'cron' => array(
          'run',
        ),
        'user' => array(
          'insert',
        ),
        'simplenews' => array(
          'subscribe',
        ),
      ),
    ),
    'simplenews_cron_action' => array(
      'description' => t('Send pending simplenews newsletters'),
      'type' => 'simplenews',
      'configurable' => FALSE,
      'hooks' => array(
        'cron' => array(
          'run',
        ),
      ),
    ),
    'simplenews_subscribe_user_action' => array(
      'type' => 'simplenews',
      'description' => t('Subscribe the user to a newsletter'),
      'configurable' => TRUE,
      'hooks' => array(
        'user' => array(
          'insert',
          'update',
        ),
      ),
    ),
    'simplenews_unsubscribe_user_action' => array(
      'type' => 'simplenews',
      'description' => t('Unsubscribe the user from a newsletter'),
      'configurable' => TRUE,
      'hooks' => array(
        'user' => array(
          'update',
          'delete',
        ),
      ),
    ),
  );
}