/** * @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); }