/** * Adds the specified component to the IComponentContainer. * @param IComponent * @param string * @param string * @return void * @throws \InvalidStateException */ public function addComponent(Nette\IComponent $component, $name, $insertBefore = NULL) { parent::addComponent($component, $name, $insertBefore); if ($this->currentGroup !== NULL && $component instanceof IFormControl) { $this->currentGroup->add($component); } }