function rule_load in Rules 6
Loads the admin proxy of the rule with the given name
1 call to rule_load()
- rule_element_load in rules_admin/
rules_admin.module
File
- rules_admin/
rules_admin.module, line 235 - Rules administration UI
Code
function rule_load($name) {
static $proxies = array();
if (!isset($proxies[$name])) {
$proxies[$name] = FALSE;
$rules = rules_get_configured_items('rules');
// Let's make sure the #set actually exists
if (isset($rules[$name]) && rules_get_rule_sets($rules[$name]['#set'])) {
rules_include('rules_admin');
$proxies[$name] = new rules_admin_rule_proxy($name, $rules[$name]);
rules_admin_fix_breadcrumb($rules[$name], $name);
}
}
return $proxies[$name];
}