aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/WallabagBundle/Controller
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2015-01-22 21:11:22 +0100
committerNicolas LÅ“uillet <nicolas@loeuillet.org>2015-01-22 21:11:22 +0100
commitbd9f08157cc10619e9bb9dace6df43090dde44a9 (patch)
tree840b9f6819758ad0493c116ef3def2936358c891 /src/WallabagBundle/Controller
parent9d50517ceaeadaba227ccdbaa43a5918abd16728 (diff)
downloadwallabag-bd9f08157cc10619e9bb9dace6df43090dde44a9.tar.gz
wallabag-bd9f08157cc10619e9bb9dace6df43090dde44a9.tar.zst
wallabag-bd9f08157cc10619e9bb9dace6df43090dde44a9.zip
article view, fav list, archive list
Diffstat (limited to 'src/WallabagBundle/Controller')
-rw-r--r--src/WallabagBundle/Controller/EntryController.php47
1 files changed, 46 insertions, 1 deletions
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
11 /** 11 /**
12 * @Route("/unread", name="unread") 12 * @Route("/unread", name="unread")
13 */ 13 */
14 public function unreadAction() 14 public function showUnreadAction()
15 { 15 {
16 $repository = $this->getDoctrine()->getRepository('WallabagBundle:Entries'); 16 $repository = $this->getDoctrine()->getRepository('WallabagBundle:Entries');
17 $entries = $repository->findUnreadByUser(1); 17 $entries = $repository->findUnreadByUser(1);
@@ -22,4 +22,49 @@ class EntryController extends Controller
22 ); 22 );
23 23
24 } 24 }
25
26 /**
27 * @Route("/archive", name="archive")
28 */
29 public function showArchiveAction()
30 {
31 $repository = $this->getDoctrine()->getRepository('WallabagBundle:Entries');
32 $entries = $repository->findArchiveByUser(1);
33
34 return $this->render(
35 'WallabagBundle:Entry:entries.html.twig',
36 array('entries' => $entries)
37 );
38
39 }
40
41 /**
42 * @Route("/starred", name="starred")
43 */
44 public function showStarredAction()
45 {
46 $repository = $this->getDoctrine()->getRepository('WallabagBundle:Entries');
47 $entries = $repository->findStarredByUser(1);
48
49 return $this->render(
50 'WallabagBundle:Entry:entries.html.twig',
51 array('entries' => $entries)
52 );
53
54 }
55
56 /**
57 * @Route("/view/{id}", requirements={"id" = "\d+"}, name="view")
58 */
59 public function viewAction($id)
60 {
61 $repository = $this->getDoctrine()->getRepository('WallabagBundle:Entries');
62 $entry = $repository->find($id);
63
64 return $this->render(
65 'WallabagBundle:Entry:entry.html.twig',
66 array('entry' => $entry)
67 );
68
69 }
25} 70}