function rules_admin_rule_proxy::_generate_index_rule in Rules 6
1 call to rules_admin_rule_proxy::_generate_index_rule()
- rules_admin_rule_proxy::get_indexed_rule in rules_admin/
rules_admin.rule_proxy.inc - 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 127 - 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 _generate_index_rule(&$elements) {
//generate ids
$this->_counter++;
$elements['#id'] = $this->_counter;
//recurse
foreach (element_children($elements) as $key) {
$this
->_generate_index_rule($elements[$key]);
}
}