Example #1
0
 /**
  * @param \Nette\Application\UI\Form $form
  */
 public function processForm(Form $form)
 {
     $values = $form->values;
     $event = $this->event ? $this->event : new Entity\Event($this->securityUser->getIdentity());
     $event->name = $values->name;
     $event->date = DateTime::from($values->date);
     $event->place = $values->place;
     $event->note = $values->note;
     $this->eventFacade->save($event);
 }
Example #2
0
 /**
  * @param $id
  */
 public function handleDeleteEvent($id)
 {
     if ($id and $event = $this->eventFacade->findEventById($id)) {
         $this->eventFacade->delete($event);
     }
     $this->flashMessage("Událost byla odebrána", "success");
     $this->redirect("this");
 }