You are here

function shoutbox_rules_event_info in Shoutbox 7

Same name and namespace in other branches
  1. 7.2 shoutbox_rules/shoutbox_rules.module \shoutbox_rules_event_info()

Implements hook_rules_event_info().

File

shoutbox_rules/shoutbox_rules.module, line 13
Includes any rules integration provided by shoutbox.

Code

function shoutbox_rules_event_info() {
  $defaults = array(
    'group' => t('Shoutbox'),
    'module' => 'shoutbox',
  );
  $items = array(
    'shoutbox_insert' => $defaults + array(
      'label' => t('After adding a shout'),
      'variables' => array(
        'user' => array(
          'type' => 'user',
          'label' => t('Shoutbox message actor'),
        ),
        'shout_message' => array(
          'type' => 'shoutbox_message',
          'label' => t('Shoutbox message'),
        ),
      ),
    ),
    'shoutbox_edit' => $defaults + array(
      'label' => t('After updating a shout'),
      'variables' => array(
        'user' => array(
          'type' => 'user',
          'label' => t('The user who edited the shout.'),
        ),
        'shout_message' => array(
          'type' => 'shoutbox_message',
          'label' => t('updated shoutbox message'),
        ),
      ),
    ),
    'shoutbox_publish' => $defaults + array(
      'label' => t('After a shout has been published'),
      'variabless' => array(
        'user' => array(
          'type' => 'user',
          'label' => t('The user who published the shout.'),
        ),
        'shout_message' => array(
          'type' => 'shoutbox_message',
          'label' => t('The shout text that was published.'),
        ),
      ),
    ),
    'shoutbox_unpublish' => $defaults + array(
      'label' => t('After a shout has been unpublished'),
      'variables' => array(
        'user' => array(
          'type' => 'user',
          'label' => t('The user who unpublished the shout.'),
        ),
        'shout_message' => array(
          'type' => 'shoutbox_message',
          'label' => t('The shout text that was unpublished.'),
        ),
      ),
    ),
    'shoutbox_delete' => $defaults + array(
      'label' => t('After a shout has been deleted'),
      'variables' => array(
        'user' => array(
          'type' => 'user',
          'label' => t('The user who deleted the shout.'),
        ),
        'shout_message' => array(
          'type' => 'shoutbox_message',
          'label' => t('The shout text that was deleted.'),
        ),
      ),
    ),
  );
  return $items;
}