App\Forms\FormFactory::create PHP Method

create() public method

public create ( ) : Nette\Application\UI\Form
return Nette\Application\UI\Form
    public function create()
    {
        $form = new Form();
        return $form;
    }

Usage Example

 /**
  * @return Form
  */
 public function create()
 {
     $form = $this->factory->create();
     $form->addText('genre', 'Název žánru: ')->setRequired('Musíte vyplnit název žánru')->addRule(Form::IS_NOT_IN, 'Tento žánr již existuje', $this->genresManager->getAllGenreNames())->getControlPrototype()->addAttributes(['tabindex' => 1, 'accesskey' => 'i']);
     $form->addSubmit('send', 'Vytvořit nový žánr')->getControlPrototype()->addAttributes(['tabindex' => 2, 'accesskey' => 's']);
     return $form;
 }
All Usage Examples Of App\Forms\FormFactory::create
FormFactory