3 namespace WallabagBundle\Controller
;
5 use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route
;
6 use Symfony\Bundle\FrameworkBundle\Controller\Controller
;
7 use WallabagBundle\Repository
;
9 class EntryController
extends Controller
12 * @Route("/unread", name="unread")
14 public function showUnreadAction()
16 $repository = $this->getDoctrine()->getRepository('WallabagBundle:Entries');
17 $entries = $repository->findUnreadByUser(1);
20 'WallabagBundle:Entry:entries.html.twig',
21 array('entries' => $entries)
27 * @Route("/archive", name="archive")
29 public function showArchiveAction()
31 $repository = $this->getDoctrine()->getRepository('WallabagBundle:Entries');
32 $entries = $repository->findArchiveByUser(1);
35 'WallabagBundle:Entry:entries.html.twig',
36 array('entries' => $entries)
42 * @Route("/starred", name="starred")
44 public function showStarredAction()
46 $repository = $this->getDoctrine()->getRepository('WallabagBundle:Entries');
47 $entries = $repository->findStarredByUser(1);
50 'WallabagBundle:Entry:entries.html.twig',
51 array('entries' => $entries)
57 * @Route("/view/{id}", requirements={"id" = "\d+"}, name="view")
59 public function viewAction($id)
61 $repository = $this->getDoctrine()->getRepository('WallabagBundle:Entries');
62 $entry = $repository->find($id);
65 'WallabagBundle:Entry:entry.html.twig',
66 array('entry' => $entry)