/**
  * Editation of already created calendar based on it's ID
  *
  * @Privilege("editcalendar")
  *
  * @param int $id               Calendar ID
  */
 public function actionEditCalendar($id)
 {
     $calendar = $this->calendars->get($id);
     if (!$calendar) {
         $this->flashMessage('Vybraný kalendář neexistuje.', 'error');
         $this->redirect('default');
     }
     $events = $this->events->getEventsFromCalendar($id);
     $form = $this['editCalendarForm'];
     $form['calendar_id']->setValue($id);
     $form['events']->setDefaults($events);
     $this->template->calendar = $calendar;
 }