public function showAction() { $calendarMapper = new CalendarMapper(); $calendar = $calendarMapper->getCalendarById($this->getRequest()->getParam('id')); $this->getLayout()->getHmenu()->add($this->getTranslator()->trans('menuCalendar'), array('controller' => 'index', 'action' => 'index'))->add($calendar->getTitle(), array('controller' => 'index', 'action' => 'show', 'id' => $calendar->getId())); $this->getView()->set('calendar', $calendarMapper->getCalendarById($this->getRequest()->getParam('id'))); }
public function delAction() { if ($this->getRequest()->isSecure()) { $calendarMapper = new CalendarMapper(); $calendarMapper->delete($this->getRequest()->getParam('id')); $this->addMessage('deleteSuccess'); } $this->redirect(array('action' => 'index')); }