function resource_conflict_rules_event_info in Resource Conflict 7.3
Implements hook_rules_event_info().
Provides a Rules event for "Resource Conflict Detected" Fires during node form validation.
File
- ./
resource_conflict.rules.inc, line 14 - Provides rule module hooks.
Code
function resource_conflict_rules_event_info() {
$events = array(
'resource_conflict_conflict_detected' => array(
'group' => t('Resource Conflict'),
'label' => t('A resource conflict was detected'),
'module' => 'resource_conflict',
'variables' => array(
'node' => array(
'type' => 'node',
'label' => t('unsaved node'),
),
'conflict_node' => array(
'type' => 'node',
'label' => t('conflicting node'),
),
),
),
'resource_conflict_node_validation' => array(
'group' => t('Resource Conflict'),
'label' => t('A resource conflict node form is validated'),
'module' => 'resource_conflict',
'variables' => array(
'node' => array(
'type' => 'node',
'label' => t('unsaved node'),
),
),
),
);
// If rules_forms is enabled, we can pass the form object as a variable
// so all the various actions that rules_forms provides can be used against
// the form.
if (module_exists('rules_forms')) {
$events['resource_conflict_node_validation']['variables']['form'] = array(
'type' => 'form',
'label' => t('form'),
);
}
return $events;
}