Esempio n. 1
0
 protected function attached($node)
 {
     if (NULL === $this->presenterComponent) {
         $this->presenterComponent = $node->presenter;
     }
     parent::attached($node);
 }
Esempio n. 2
0
	/**
	 * @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);
	}
Esempio n. 3
0
	/**
	 * 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();
	}