Exemplo n.º 1
0
 public function eventFormSubmittedHandle(BaseForm $form)
 {
     $values = $form->getValues();
     try {
         switch ($form->getMode()) {
             case FormMode::CREATE_MODE:
                 $this->createEvent($values);
                 break;
             case FormMode::UPDATE_MODE:
                 $this->updateEvent($values);
                 break;
         }
     } catch (Exceptions\DuplicateEntryException $ex) {
         $form->addError("eventsModule.eventForm.errors.eventAlreadyExist");
     }
 }