You are here

function privatemsg_rules_rules_action_info in Privatemsg 6.2

Same name and namespace in other branches
  1. 7.2 privatemsg_rules/privatemsg_rules.rules.inc \privatemsg_rules_rules_action_info()
  2. 7 privatemsg_rules/privatemsg_rules.rules.inc \privatemsg_rules_rules_action_info()

Implements hook_rules_action_info().

File

privatemsg_rules/privatemsg_rules.rules.inc, line 13
Hooks and callback functions for rules.module integration.

Code

function privatemsg_rules_rules_action_info() {
  return array(
    'privatemsg_rules_new' => array(
      'label' => t('Send a message'),
      'arguments' => array(
        'subject' => array(
          'type' => 'string',
          'label' => t('Subject'),
        ),
        'body' => array(
          'type' => 'string',
          'label' => t('Body text'),
          'long' => TRUE,
        ),
        'recipient' => array(
          'type' => 'user',
          'label' => t('Recipient'),
        ),
        'author' => array(
          'type' => 'user',
          'label' => t('Author'),
        ),
      ),
      'module' => 'Privatemsg',
    ),
    'privatemsg_rules_reply' => array(
      'label' => t('Reply a message'),
      'arguments' => array(
        'thread_id' => array(
          'type' => 'int',
          'label' => t('Privatemsg thread id'),
        ),
        'body' => array(
          'type' => 'string',
          'label' => t('Body text'),
          'long' => TRUE,
        ),
        'author' => array(
          'type' => 'user',
          'label' => t('Author'),
        ),
      ),
      'module' => 'Privatemsg',
    ),
    'privatemsg_rules_tag_thread' => array(
      'label' => t('Tag a privatemsg thread'),
      'arguments' => array(
        'thread_id' => array(
          'type' => 'int',
          'label' => t('Privatemsg thread id'),
        ),
        'tag_to_add' => array(
          'type' => 'tag',
          'label' => t('Tag'),
          'long' => TRUE,
        ),
        'tag_for' => array(
          'type' => 'user',
          'label' => t('User for which the message will be tagged'),
        ),
      ),
      'module' => 'Privatemsg',
    ),
    'privatemsg_rules_load_tag' => array(
      'label' => t('Load a tag'),
      'new variables' => array(
        'tag_loaded' => array(
          'type' => 'tag',
          'label' => t('Loaded tag'),
        ),
      ),
      'help' => t('Enter an id or name of the tag to load.'),
      'module' => 'Privatemsg',
      'eval input' => array(
        'tagid',
        'tag',
      ),
    ),
  );
}