You are here

forward.rules.inc in Forward 7.3

Same filename and directory in other branches
  1. 7 forward.rules.inc
  2. 7.2 forward.rules.inc

forward.rules.inc Expose the forward event to rules

File

forward.rules.inc
View source
<?php

/**
 * @file
 * forward.rules.inc
 * Expose the forward event to rules
 */

/**
 * Implementation of hook_rules_event_info().
 * @ingroup rules
 */
function forward_rules_event_info() {
  $items = array(
    'entity_forward' => array(
      'label' => t('After an entity has been forwarded'),
      'group' => t('Entity'),
      'variables' => array(
        'user' => array(
          'type' => 'user',
          'label' => t('User who forwarded'),
        ),
        'forwarded_entity' => array(
          'type' => 'entity',
          'label' => t('The entity being forwarded'),
        ),
      ),
    ),
    'node_forward' => array(
      'label' => t('After a node has been forwarded'),
      'group' => t('Node'),
      'variables' => array(
        'user' => array(
          'type' => 'user',
          'label' => t('User who forwarded'),
        ),
        'forwarded_node' => array(
          'type' => 'node',
          'label' => t('The node being forwarded'),
        ),
      ),
    ),
  );
  return $items;
}

Functions

Namesort descending Description
forward_rules_event_info Implementation of hook_rules_event_info().