/** * Adds the specified component to the IContainer. * @param IComponent * @param string * @param string * @return self * @throws InvalidStateException */ public function addComponent(IComponent $component, $name, $insertBefore = NULL) { parent::addComponent($component, $name, $insertBefore); if ($this->currentGroup !== NULL && $component instanceof IFormControl) { $this->currentGroup->add($component); } return $this; }
function addGroup($caption = NULL, $setAsCurrent = TRUE) { $group = new NFormGroup(); $group->setOption('label', $caption); $group->setOption('visual', TRUE); if ($setAsCurrent) { $this->setCurrentGroup($group); } if (isset($this->groups[$caption])) { return $this->groups[] = $group; } else { return $this->groups[$caption] = $group; } }