protected function attached($node) { if (NULL === $this->presenterComponent) { $this->presenterComponent = $node->presenter; } parent::attached($node); }
/** * @param string caption */ public function __construct($caption = NULL) { $this->monitor('NForm'); parent::__construct(); $this->control = NHtml::el('input'); $this->label = NHtml::el('label'); $this->caption = $caption; $this->rules = new NRules($this); }
/** * Object cloning. */ public function __clone() { if ($this->components) { $oldMyself = reset($this->components)->getParent(); $oldMyself->cloning = $this; foreach ($this->components as $name => $component) { $this->components[$name] = clone $component; } $oldMyself->cloning = NULL; } parent::__clone(); }