aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Controller/EntryController.php
diff options
context:
space:
mode:
authorJeremy Benoist <j0k3r@users.noreply.github.com>2015-08-21 17:49:20 +0200
committerJeremy Benoist <j0k3r@users.noreply.github.com>2015-08-21 17:49:20 +0200
commitf506da40e2573a98cd84159b2ee36621220a2771 (patch)
tree4c14cdb582ddd7fe43e9081e052144270bd28758 /src/Wallabag/CoreBundle/Controller/EntryController.php
parent78f66dcc527943e2ebb7e58108e3a5bb257f75b5 (diff)
parent3b84dc08fcc663f758c4fbba186aeb95f212fddd (diff)
downloadwallabag-f506da40e2573a98cd84159b2ee36621220a2771.tar.gz
wallabag-f506da40e2573a98cd84159b2ee36621220a2771.tar.zst
wallabag-f506da40e2573a98cd84159b2ee36621220a2771.zip
Merge pull request #1385 from wallabag/v2-status-filter
filters: implement status filter and a new view (to display all entries)
Diffstat (limited to 'src/Wallabag/CoreBundle/Controller/EntryController.php')
-rw-r--r--src/Wallabag/CoreBundle/Controller/EntryController.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/Wallabag/CoreBundle/Controller/EntryController.php b/src/Wallabag/CoreBundle/Controller/EntryController.php
index b6a68963..b73e9eec 100644
--- a/src/Wallabag/CoreBundle/Controller/EntryController.php
+++ b/src/Wallabag/CoreBundle/Controller/EntryController.php
@@ -102,6 +102,21 @@ class EntryController extends Controller
102 } 102 }
103 103
104 /** 104 /**
105 * Shows all entries for current user.
106 *
107 * @param Request $request
108 * @param int $page
109 *
110 * @Route("/all/list/{page}", name="all", defaults={"page" = "1"})
111 *
112 * @return \Symfony\Component\HttpFoundation\Response
113 */
114 public function showAllAction(Request $request, $page)
115 {
116 return $this->showEntries('all', $request, $page);
117 }
118
119 /**
105 * Shows unread entries for current user. 120 * Shows unread entries for current user.
106 * 121 *
107 * @param Request $request 122 * @param Request $request
@@ -173,6 +188,10 @@ class EntryController extends Controller
173 $qb = $repository->getBuilderForUnreadByUser($this->getUser()->getId()); 188 $qb = $repository->getBuilderForUnreadByUser($this->getUser()->getId());
174 break; 189 break;
175 190
191 case 'all':
192 $qb = $repository->getBuilderForAllByUser($this->getUser()->getId());
193 break;
194
176 default: 195 default:
177 throw new \InvalidArgumentException(sprintf('Type "%s" is not implemented.', $type)); 196 throw new \InvalidArgumentException(sprintf('Type "%s" is not implemented.', $type));
178 } 197 }