aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Controller/EntryController.php
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2015-02-06 07:45:32 +0100
committerNicolas LÅ“uillet <nicolas@loeuillet.org>2015-02-06 07:45:32 +0100
commitbe463487cc195026b11e92f1d6d6276f5851b97e (patch)
tree5d5bd15db7ae19994da55574ade821acdc115c36 /src/Wallabag/CoreBundle/Controller/EntryController.php
parent905ae369bd0238cc24c3c4e0ac60d578d30b54bb (diff)
downloadwallabag-be463487cc195026b11e92f1d6d6276f5851b97e.tar.gz
wallabag-be463487cc195026b11e92f1d6d6276f5851b97e.tar.zst
wallabag-be463487cc195026b11e92f1d6d6276f5851b97e.zip
rename Entries to Entry
Diffstat (limited to 'src/Wallabag/CoreBundle/Controller/EntryController.php')
-rw-r--r--src/Wallabag/CoreBundle/Controller/EntryController.php26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/Wallabag/CoreBundle/Controller/EntryController.php b/src/Wallabag/CoreBundle/Controller/EntryController.php
index eb5b43ad..6326d31f 100644
--- a/src/Wallabag/CoreBundle/Controller/EntryController.php
+++ b/src/Wallabag/CoreBundle/Controller/EntryController.php
@@ -5,8 +5,8 @@ namespace Wallabag\CoreBundle\Controller;
5use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; 5use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
6use Symfony\Bundle\FrameworkBundle\Controller\Controller; 6use Symfony\Bundle\FrameworkBundle\Controller\Controller;
7use Symfony\Component\HttpFoundation\Request; 7use Symfony\Component\HttpFoundation\Request;
8use Wallabag\CoreBundle\Entity\Entry;
8use Wallabag\CoreBundle\Repository; 9use Wallabag\CoreBundle\Repository;
9use Wallabag\CoreBundle\Entity\Entries;
10use Wallabag\CoreBundle\Service\Extractor; 10use Wallabag\CoreBundle\Service\Extractor;
11use Wallabag\CoreBundle\Helper\Url; 11use Wallabag\CoreBundle\Helper\Url;
12 12
@@ -19,7 +19,7 @@ class EntryController extends Controller
19 */ 19 */
20 public function addEntryAction(Request $request) 20 public function addEntryAction(Request $request)
21 { 21 {
22 $entry = new Entries(); 22 $entry = new Entry();
23 $entry->setUserId(1); 23 $entry->setUserId(1);
24 24
25 $form = $this->createFormBuilder($entry) 25 $form = $this->createFormBuilder($entry)
@@ -60,7 +60,7 @@ class EntryController extends Controller
60 */ 60 */
61 public function showUnreadAction() 61 public function showUnreadAction()
62 { 62 {
63 $repository = $this->getDoctrine()->getRepository('WallabagCoreBundle:Entries'); 63 $repository = $this->getDoctrine()->getRepository('WallabagCoreBundle:Entry');
64 // TODO don't give the user ID like this 64 // TODO don't give the user ID like this
65 // TODO change pagination 65 // TODO change pagination
66 $entries = $repository->findUnreadByUser(1, 0); 66 $entries = $repository->findUnreadByUser(1, 0);
@@ -79,7 +79,7 @@ class EntryController extends Controller
79 */ 79 */
80 public function showArchiveAction() 80 public function showArchiveAction()
81 { 81 {
82 $repository = $this->getDoctrine()->getRepository('WallabagCoreBundle:Entries'); 82 $repository = $this->getDoctrine()->getRepository('WallabagCoreBundle:Entry');
83 // TODO don't give the user ID like this 83 // TODO don't give the user ID like this
84 // TODO change pagination 84 // TODO change pagination
85 $entries = $repository->findArchiveByUser(1, 0); 85 $entries = $repository->findArchiveByUser(1, 0);
@@ -98,7 +98,7 @@ class EntryController extends Controller
98 */ 98 */
99 public function showStarredAction() 99 public function showStarredAction()
100 { 100 {
101 $repository = $this->getDoctrine()->getRepository('WallabagCoreBundle:Entries'); 101 $repository = $this->getDoctrine()->getRepository('WallabagCoreBundle:Entry');
102 // TODO don't give the user ID like this 102 // TODO don't give the user ID like this
103 // TODO change pagination 103 // TODO change pagination
104 $entries = $repository->findStarredByUser(1, 0); 104 $entries = $repository->findStarredByUser(1, 0);
@@ -112,11 +112,11 @@ class EntryController extends Controller
112 /** 112 /**
113 * Shows entry content 113 * Shows entry content
114 * 114 *
115 * @param Entries $entry 115 * @param Entry $entry
116 * @Route("/view/{id}", requirements={"id" = "\d+"}, name="view") 116 * @Route("/view/{id}", requirements={"id" = "\d+"}, name="view")
117 * @return \Symfony\Component\HttpFoundation\Response 117 * @return \Symfony\Component\HttpFoundation\Response
118 */ 118 */
119 public function viewAction(Entries $entry) 119 public function viewAction(Entry $entry)
120 { 120 {
121 return $this->render( 121 return $this->render(
122 'WallabagCoreBundle:Entry:entry.html.twig', 122 'WallabagCoreBundle:Entry:entry.html.twig',
@@ -128,11 +128,11 @@ class EntryController extends Controller
128 * Changes read status for an entry 128 * Changes read status for an entry
129 * 129 *
130 * @param Request $request 130 * @param Request $request
131 * @param Entries $entry 131 * @param Entry $entry
132 * @Route("/archive/{id}", requirements={"id" = "\d+"}, name="archive_entry") 132 * @Route("/archive/{id}", requirements={"id" = "\d+"}, name="archive_entry")
133 * @return \Symfony\Component\HttpFoundation\RedirectResponse 133 * @return \Symfony\Component\HttpFoundation\RedirectResponse
134 */ 134 */
135 public function toggleArchiveAction(Request $request, Entries $entry) 135 public function toggleArchiveAction(Request $request, Entry $entry)
136 { 136 {
137 $entry->toggleArchive(); 137 $entry->toggleArchive();
138 $this->getDoctrine()->getManager()->flush(); 138 $this->getDoctrine()->getManager()->flush();
@@ -149,11 +149,11 @@ class EntryController extends Controller
149 * Changes favorite status for an entry 149 * Changes favorite status for an entry
150 * 150 *
151 * @param Request $request 151 * @param Request $request
152 * @param Entries $entry 152 * @param Entry $entry
153 * @Route("/star/{id}", requirements={"id" = "\d+"}, name="star_entry") 153 * @Route("/star/{id}", requirements={"id" = "\d+"}, name="star_entry")
154 * @return \Symfony\Component\HttpFoundation\RedirectResponse 154 * @return \Symfony\Component\HttpFoundation\RedirectResponse
155 */ 155 */
156 public function toggleStarAction(Request $request, Entries $entry) 156 public function toggleStarAction(Request $request, Entry $entry)
157 { 157 {
158 $entry->toggleStar(); 158 $entry->toggleStar();
159 $this->getDoctrine()->getManager()->flush(); 159 $this->getDoctrine()->getManager()->flush();
@@ -170,11 +170,11 @@ class EntryController extends Controller
170 * Deletes entry 170 * Deletes entry
171 * 171 *
172 * @param Request $request 172 * @param Request $request
173 * @param Entries $entry 173 * @param Entry $entry
174 * @Route("/delete/{id}", requirements={"id" = "\d+"}, name="delete_entry") 174 * @Route("/delete/{id}", requirements={"id" = "\d+"}, name="delete_entry")
175 * @return \Symfony\Component\HttpFoundation\RedirectResponse 175 * @return \Symfony\Component\HttpFoundation\RedirectResponse
176 */ 176 */
177 public function deleteEntryAction(Request $request, Entries $entry) 177 public function deleteEntryAction(Request $request, Entry $entry)
178 { 178 {
179 $em = $this->getDoctrine()->getManager(); 179 $em = $this->getDoctrine()->getManager();
180 $entry->setDeleted(1); 180 $entry->setDeleted(1);