/** * Adds the specified component to the IComponentContainer. * @param IComponent * @param string * @param string * @return void * @throws Nette\InvalidStateException */ public function addComponent(Nette\ComponentModel\IComponent $component, $name, $insertBefore = NULL) { parent::addComponent($component, $name, $insertBefore); if ($this->currentGroup !== NULL && $component instanceof IControl) { $this->currentGroup->add($component); } }
/** * Adds naming container to the form. * @param string name * @return Container */ public function addContainer($name) { $control = new self(); $control->currentGroup = $this->currentGroup; if ($this->currentGroup !== NULL) { $this->currentGroup->add($control); } return $this[$name] = $control; }