/** * Sets variables for view of "Akce" page */ public function renderDefault() { $template = $this->template; $template->title = "Akce"; $template->events = $this->events->getCurrentEvents(); $template->calendars = $this->calendars->getVisibleCalendars(); }
/** * Processing of Add calendar Form * * @Privilege("createcalendar") * * @param Form $form */ public function addCalendarFormSucceded(Form $form) { $values = $form->getValues(TRUE); unset($values['send']); if ($this->calendars->getCalendar($values['year'], $values['yearpart'])) { //intentionally not form error, since they have what they need $this->flashMessage("Kalendář pro " . $values['yearpart'] . " " . $values['year'] . " už existuje."); } else { $this->calendars->insert($values); $this->flashMessage("Kalednář byl úspěšně přídán"); } $this->redirect('Event:'); }