Exemplo n.º 1
0
 /**
  * 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();
 }
Exemplo n.º 2
0
 /**
  * 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:');
 }