HosipLan

Untitled

Jun 21st, 2011
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.44 KB | None | 0 0
  1.     /**
  2.      * Magická továrna na komponenty
  3.      *
  4.      * @param string $name
  5.      * @return Nette\Forms\Container
  6.      */
  7.     protected function createComponent($name)
  8.     {
  9.         $firstControl = current($this->getComponents(FALSE, 'Nette\Forms\IControl'));
  10.  
  11.         $control = new Container;
  12.         $control->currentGroup = $this->currentGroup;
  13.         $this->addComponent($name, $control, $firstControl);
  14.  
  15.         $this->factoryCallback->invoke($control);
  16.  
  17.         return $control;
  18.     }
Advertisement
Add Comment
Please, Sign In to add comment