Esempio n. 1
0
 /**
  * Application form constructor.
  */
 public function __construct(Nette\IComponentContainer $parent = NULL, $name = NULL)
 {
     parent::__construct();
     $this->monitor('Nette\\Application\\Presenter');
     if ($parent !== NULL) {
         $parent->addComponent($this, $name);
     }
 }
Esempio n. 2
0
 /**
  * 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);
     }
 }