コード例 #1
0
 public function showAction()
 {
     $this->createTabs('event', 'show');
     $type = $this->getParam('type');
     if ($type === null) {
         throw new IcingaException('You need to specify a type to show events from!');
     }
     $this->assertEventType($type);
     $id = $this->getParam('id');
     if ($id === null) {
         throw new IcingaException('You need to specify the event id!');
     }
     $this->view->eventType = $eventType = EventTypeRepository::load($type);
     $this->view->event = Event::fromRepository($eventType->getEventQuery(), $id);
 }