You are here

function relation_rules_event_info in Relation 7

Same name and namespace in other branches
  1. 8.2 relation.rules.inc \relation_rules_event_info()
  2. 8 relation.rules.inc \relation_rules_event_info()

Implements hook_rules_event_info().

File

./relation.rules.inc, line 11
Implements the Rules module API for Relation.

Code

function relation_rules_event_info() {
  return array(
    'relation_insert' => array(
      'label' => t('After saving a new relation'),
      'group' => t('Relation'),
      'variables' => array(
        'relation' => array(
          'type' => 'relation',
          'label' => t('relation'),
          'description' => t('The relation.'),
        ),
      ),
    ),
    'relation_update' => array(
      'label' => t('After updating a relation'),
      'group' => t('Relation'),
      'variables' => array(
        'relation' => array(
          'type' => 'relation',
          'label' => t('relation'),
          'description' => t('The relation.'),
        ),
        'relation_unchanged' => array(
          'type' => 'relation',
          'label' => t('unchanged relation'),
          'description' => t('The unchanged relation.'),
          'handler' => 'rules_events_entity_unchanged',
        ),
      ),
    ),
    'relation_delete' => array(
      'label' => t('After deleting a relation'),
      'group' => t('Relation'),
      'variables' => array(
        'relation' => array(
          'type' => 'relation',
          'label' => t('relation'),
        ),
      ),
    ),
  );
}