Example #1
0
 /**
  * @param Form $form
  */
 public function configure(Form $form)
 {
     $form->addProtection();
     $form->addAntispam();
     if (!$this->user->isLoggedIn()) {
         $form->addText('author', 'Name')->setRequired();
     }
     $form->addTextArea('text', 'Text')->setRequired(TRUE)->getControlPrototype()->class[] = 'input-block-level';
     $form->addSaveButton('Save');
 }