You are here

public function RulesPlugin::root in Rules 7.2

Gets the root element of the configuration.

1 call to RulesPlugin::root()
RulesPlugin::elementMap in includes/rules.core.inc
Gets the element map helper object, which helps mapping elements to ids.

File

includes/rules.core.inc, line 513
Rules base classes and interfaces needed for any rule evaluation.

Class

RulesPlugin
Base class for rules plugins.

Code

public function root() {
  $element = $this;
  while (!$element
    ->isRoot()) {
    $element = $element->parent;
  }
  return $element;
}