HosipLan

Untitled

Jan 30th, 2013
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.44 KB | None | 0 0
  1.     protected function createComponentEditEntityForm($name)
  2.     {
  3.         $formName = $this->entityName.'Form';
  4.         if (!$formName is_subclass_of Nette\Application\UI\Form) {
  5.             throw new InvalidStateException("Missing form $formName");
  6.         }
  7.  
  8.         $form = new $formName;
  9.         $form->setTranslator($this->getTranslator());
  10.         $form->addSubmit('send', 'send')
  11.             ->setAttribute('class', 'bGreen buttonS')
  12.             ->onClick[] = $this->doEditEntity;
  13.  
  14.         return $form;
  15.     }
Advertisement
Add Comment
Please, Sign In to add comment