You are here

function _rules_get_rule_sets in Rules 6

Actually retrieves all active rules bypassing the cache

1 call to _rules_get_rule_sets()
rules_get_rule_set in rules/rules.module
Returns the rule set $set_name, which includes the set info and the rules. To improve performance rule sets are cached.

File

rules/rules.module, line 196
Rules engine module

Code

function _rules_get_rule_sets() {
  $sets = array();
  $rules = array_filter(rules_get_configured_items('rules'), '_rules_rule_is_active');
  foreach ($rules as $name => $rule) {
    $sets += array(
      $rule['#set'] => array(),
    );
    $sets[$rule['#set']]['info'] = rules_get_rule_sets($rule['#set']);

    // Set the name for rules, so that it's avaialbe during evaluation
    $rule['#name'] = $name;
    $sets[$rule['#set']]['rules'][$name] = $rule;
  }
  return $sets;
}