add() public method

public add ( $items ) : self
return self
Example #1
0
 /**
  * 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);
     }
 }
Example #2
0
 /**
  * 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;
 }