Example #1
0
 /**
  * Render a content page without the body. Used for ajax calls.
  *
  * @param Request $request
  * @param         $path
  *
  * @return Response
  */
 public function contentAction(Request $request, $path)
 {
     $pageInfo = $this->reader->getInfo($path . '.md');
     $response = new Response();
     $response->setETag($pageInfo->getEtag());
     $lastModified = $pageInfo->getLastModified();
     if ($this->assetsVersion - $pageInfo->getLastModified()->getTimestamp() > 0) {
         $lastModified = new \DateTime('@' . $this->assetsVersion);
     }
     $response->setLastModified($lastModified);
     $response->setPublic();
     if ($response->isNotModified($request)) {
         return $response;
     }
     $p = $this->reader->getPage($path . '.md');
     $response->setContent($p->getContent());
     return $response;
 }
Example #2
0
 /**
  * @return Response
  * @Template()
  */
 public function participantListAction()
 {
     $event = $this->eventRepo->getNextEvent()->getOrThrow(new AccessDeniedHttpException('No event.'));
     $participants = $this->registrationRepo->getParticipantList($event);
     return array('participants' => $participants, 'sponsors' => $this->reader->getPage('Sponsoren/Index.md'));
 }