You are here

function rules_admin_rule_proxy::get_indexed_rule in Rules 6

Gets the rule with set #id properties, useful for rendering. Note: Any possible changes done, won't appear in the returned rule.

File

rules_admin/rules_admin.rule_proxy.inc, line 119
Contains the rules proxy class

Class

rules_admin_rule_proxy
This is a smally proxy for the real rule. It provides some useful operations for the admin UI. It builds a small index for the elements of a rule, so that they can be easily identified and modified.

Code

function get_indexed_rule() {
  $this->_counter = 0;
  $index_rule = $this->_rule;
  $this
    ->_generate_index_rule($index_rule['#conditions']);
  $this
    ->_generate_index_rule($index_rule['#actions']);
  return $index_rule;
}