function RulesContainerPlugin::__clone

By default we do a deep clone.

Overrides RulesPlugin::__clone

1 call to RulesContainerPlugin::__clone()
Rule::__clone in includes/rules.plugins.inc
By default we do a deep clone.
1 method overrides RulesContainerPlugin::__clone()
Rule::__clone in includes/rules.plugins.inc
By default we do a deep clone.

File

includes/rules.core.inc, line 2388

Class

RulesContainerPlugin
Base class for ContainerPlugins like Rules, Logical Operations or Loops.

Code

public function __clone() {
    parent::__clone();
    foreach ($this->children as $key => $child) {
        $this->children[$key] = clone $child;
        $this->children[$key]->parent = $this;
    }
}