/** * Application form constructor. */ public function __construct(IComponentContainer $parent = NULL, $name = NULL) { parent::__construct(); $this->monitor('NPresenter'); if ($parent !== NULL) { $parent->addComponent($this, $name); } }
/** * Object cloning. */ public function __clone() { if ($this->parent === NULL) { return; } elseif ($this->parent instanceof ComponentContainer) { $this->parent = $this->parent->isCloning(); if ($this->parent === NULL) { // not cloning $this->refreshMonitors(0); } } else { $this->parent = NULL; $this->refreshMonitors(0); } }