Ejemplo n.º 1
0
 public function eventByYearMonth(Request $request, Response $response, $args)
 {
     $year = intval($args["year"]);
     $month = intval($args["month"]);
     $eventMeta = $this->eventManager->getByYearMonth($year, $month);
     $event = $this->eventService->getEventById($eventMeta[0]['meetup_id']);
     $resWithETag = $this->cache->withETag($response, $eventMeta[0]['meetup_id']);
     $previousEvents = $this->eventService->getPastEvents();
     $this->view->render($response, 'event.twig', ['event' => $event, 'eventMeta' => $eventMeta[0], 'previousEvents' => $previousEvents]);
     return $resWithETag;
 }
Ejemplo n.º 2
0
 public function dispatch(Request $request, Response $response, $args)
 {
     $meetupID = $request->getAttribute('meetup_id', false);
     if (!$meetupID) {
         $eventDetails['errors'][] = 'A meetup ID needs to be provided.';
     } else {
         $eventDetails = ['meetup_event' => $this->eventService->getEventById($meetupID), 'event_info' => $this->eventService->getEventInfo($meetupID)];
     }
     $eventDetails['errors'] = $this->flash->getMessage('event') ?? [];
     $this->view->render($response, 'admin/event-info.twig', $eventDetails);
     return $response;
 }