public function processForm(Form $form, $values) { if ($this->listing === null) { $this->listing = new Listing($values['year'], $values['month'], $this->owner); } $this->listing->description = $values['description']; $this->listing->hourlyWage = $values['hourlyWage']; $this->listingFacade->saveListing($this->listing); $this->presenter->flashMessage('Výčetka pro ' . TimeUtils::getMonthName($values['month']) . ' ' . $values['year'] . ' byla uložena.', 'success'); if (isset($this->presenter->backlink)) { $this->presenter->restoreRequest($this->presenter->backlink); } $this->presenter->redirect('Listing:overview', array('month' => $values['month'], 'year' => $values['year'])); }