X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabagBundle%2FController%2FEntryController.php;h=233a6c32bcf37946368eaf570e78e69023c24680;hb=bd9f08157cc10619e9bb9dace6df43090dde44a9;hp=0c0c156905b9d899a240ca2421fdcec0b1335eb6;hpb=9d50517ceaeadaba227ccdbaa43a5918abd16728;p=github%2Fwallabag%2Fwallabag.git diff --git a/src/WallabagBundle/Controller/EntryController.php b/src/WallabagBundle/Controller/EntryController.php index 0c0c1569..233a6c32 100644 --- a/src/WallabagBundle/Controller/EntryController.php +++ b/src/WallabagBundle/Controller/EntryController.php @@ -11,7 +11,7 @@ class EntryController extends Controller /** * @Route("/unread", name="unread") */ - public function unreadAction() + public function showUnreadAction() { $repository = $this->getDoctrine()->getRepository('WallabagBundle:Entries'); $entries = $repository->findUnreadByUser(1); @@ -22,4 +22,49 @@ class EntryController extends Controller ); } + + /** + * @Route("/archive", name="archive") + */ + public function showArchiveAction() + { + $repository = $this->getDoctrine()->getRepository('WallabagBundle:Entries'); + $entries = $repository->findArchiveByUser(1); + + return $this->render( + 'WallabagBundle:Entry:entries.html.twig', + array('entries' => $entries) + ); + + } + + /** + * @Route("/starred", name="starred") + */ + public function showStarredAction() + { + $repository = $this->getDoctrine()->getRepository('WallabagBundle:Entries'); + $entries = $repository->findStarredByUser(1); + + return $this->render( + 'WallabagBundle:Entry:entries.html.twig', + array('entries' => $entries) + ); + + } + + /** + * @Route("/view/{id}", requirements={"id" = "\d+"}, name="view") + */ + public function viewAction($id) + { + $repository = $this->getDoctrine()->getRepository('WallabagBundle:Entries'); + $entry = $repository->find($id); + + return $this->render( + 'WallabagBundle:Entry:entry.html.twig', + array('entry' => $entry) + ); + + } }