aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/WallabagBundle/Controller
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2015-01-22 17:18:56 +0100
committerNicolas LÅ“uillet <nicolas@loeuillet.org>2015-01-22 17:18:56 +0100
commit9d50517ceaeadaba227ccdbaa43a5918abd16728 (patch)
tree5aa92beb3250895079690d7ecb8b3ddde28cda15 /src/WallabagBundle/Controller
parent2b9fe72b397a239c40f8c66d83506e0e2e8d5854 (diff)
downloadwallabag-9d50517ceaeadaba227ccdbaa43a5918abd16728.tar.gz
wallabag-9d50517ceaeadaba227ccdbaa43a5918abd16728.tar.zst
wallabag-9d50517ceaeadaba227ccdbaa43a5918abd16728.zip
migrating legacy to symfony
Diffstat (limited to 'src/WallabagBundle/Controller')
-rw-r--r--src/WallabagBundle/Controller/DefaultController.php17
-rw-r--r--src/WallabagBundle/Controller/EntryController.php25
2 files changed, 25 insertions, 17 deletions
diff --git a/src/WallabagBundle/Controller/DefaultController.php b/src/WallabagBundle/Controller/DefaultController.php
deleted file mode 100644
index 1030b7a6..00000000
--- a/src/WallabagBundle/Controller/DefaultController.php
+++ /dev/null
@@ -1,17 +0,0 @@
1<?php
2
3namespace WallabagBundle\Controller;
4
5use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
6use Symfony\Bundle\FrameworkBundle\Controller\Controller;
7
8class DefaultController extends Controller
9{
10 /**
11 * @Route("/app/index", name="homepage")
12 */
13 public function indexAction()
14 {
15 return $this->render('default/index.html.twig');
16 }
17}
diff --git a/src/WallabagBundle/Controller/EntryController.php b/src/WallabagBundle/Controller/EntryController.php
new file mode 100644
index 00000000..0c0c1569
--- /dev/null
+++ b/src/WallabagBundle/Controller/EntryController.php
@@ -0,0 +1,25 @@
1<?php
2
3namespace WallabagBundle\Controller;
4
5use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
6use Symfony\Bundle\FrameworkBundle\Controller\Controller;
7use WallabagBundle\Repository;
8
9class EntryController extends Controller
10{
11 /**
12 * @Route("/unread", name="unread")
13 */
14 public function unreadAction()
15 {
16 $repository = $this->getDoctrine()->getRepository('WallabagBundle:Entries');
17 $entries = $repository->findUnreadByUser(1);
18
19 return $this->render(
20 'WallabagBundle:Entry:entries.html.twig',
21 array('entries' => $entries)
22 );
23
24 }
25}