function rules_invoke_rule_set in Rules 6
Invokes configured rules for the given rule set
Parameters
$set_name The name of the rule set to invoke:
$args Further arguments as defined for the rule set:
5 calls to rules_invoke_rule_set()
- RulesTestCase::test_1 in rules_test/
rules_test.test - RulesTestCase::test_2 in rules_test/
rules_test.test - RulesTestCase::test_3 in rules_test/
rules_test.test - RulesTestCase::test_4 in rules_test/
rules_test.test - RulesTestCase::test_5 in rules_test/
rules_test.test
2 string references to 'rules_invoke_rule_set'
- rules_invoke_event in rules/
rules.module - Invokes configured rules for the given event
- rules_scheduler_cron in rules_scheduler/
rules_scheduler.module - Implementation of hook_cron().
File
- rules/
rules.module, line 265 - Rules engine module
Code
function rules_invoke_rule_set() {
$args = func_get_args();
$set_name = array_shift($args);
if ($set = rules_get_rule_set($set_name)) {
rules_include('rules');
$state = array(
'set_info' => $set['info'],
);
_rules_initialize_variables($state, $args);
rules_evaluate_rule_set($set_name, $set, $state);
//only show the log, if this is no nested evaluation
if (rules_log_evaluation_finished()) {
rules_show_log();
}
}
}