Beispiel #1
0
	/**
	 * 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;
	}
Beispiel #2
0
 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;
     }
 }