aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Controller/EntryController.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/Wallabag/CoreBundle/Controller/EntryController.php')
-rw-r--r--src/Wallabag/CoreBundle/Controller/EntryController.php53
1 files changed, 8 insertions, 45 deletions
diff --git a/src/Wallabag/CoreBundle/Controller/EntryController.php b/src/Wallabag/CoreBundle/Controller/EntryController.php
index 5c8ecb40..cd9e8d27 100644
--- a/src/Wallabag/CoreBundle/Controller/EntryController.php
+++ b/src/Wallabag/CoreBundle/Controller/EntryController.php
@@ -21,8 +21,7 @@ use Wallabag\CoreBundle\Form\Type\SearchEntryType;
21class EntryController extends Controller 21class EntryController extends Controller
22{ 22{
23 /** 23 /**
24 * @param Request $request 24 * @param int $page
25 * @param int $page
26 * 25 *
27 * @Route("/search/{page}", name="search", defaults={"page" = 1}) 26 * @Route("/search/{page}", name="search", defaults={"page" = 1})
28 * 27 *
@@ -53,8 +52,6 @@ class EntryController extends Controller
53 } 52 }
54 53
55 /** 54 /**
56 * @param Request $request
57 *
58 * @Route("/new-entry", name="new_entry") 55 * @Route("/new-entry", name="new_entry")
59 * 56 *
60 * @return \Symfony\Component\HttpFoundation\Response 57 * @return \Symfony\Component\HttpFoundation\Response
@@ -97,8 +94,6 @@ class EntryController extends Controller
97 } 94 }
98 95
99 /** 96 /**
100 * @param Request $request
101 *
102 * @Route("/bookmarklet", name="bookmarklet") 97 * @Route("/bookmarklet", name="bookmarklet")
103 * 98 *
104 * @return \Symfony\Component\HttpFoundation\Response 99 * @return \Symfony\Component\HttpFoundation\Response
@@ -135,9 +130,6 @@ class EntryController extends Controller
135 /** 130 /**
136 * Edit an entry content. 131 * Edit an entry content.
137 * 132 *
138 * @param Request $request
139 * @param Entry $entry
140 *
141 * @Route("/edit/{id}", requirements={"id" = "\d+"}, name="edit") 133 * @Route("/edit/{id}", requirements={"id" = "\d+"}, name="edit")
142 * 134 *
143 * @return \Symfony\Component\HttpFoundation\Response 135 * @return \Symfony\Component\HttpFoundation\Response
@@ -171,8 +163,7 @@ class EntryController extends Controller
171 /** 163 /**
172 * Shows all entries for current user. 164 * Shows all entries for current user.
173 * 165 *
174 * @param Request $request 166 * @param int $page
175 * @param int $page
176 * 167 *
177 * @Route("/all/list/{page}", name="all", defaults={"page" = "1"}) 168 * @Route("/all/list/{page}", name="all", defaults={"page" = "1"})
178 * 169 *
@@ -186,8 +177,7 @@ class EntryController extends Controller
186 /** 177 /**
187 * Shows unread entries for current user. 178 * Shows unread entries for current user.
188 * 179 *
189 * @param Request $request 180 * @param int $page
190 * @param int $page
191 * 181 *
192 * @Route("/unread/list/{page}", name="unread", defaults={"page" = "1"}) 182 * @Route("/unread/list/{page}", name="unread", defaults={"page" = "1"})
193 * 183 *
@@ -206,8 +196,7 @@ class EntryController extends Controller
206 /** 196 /**
207 * Shows read entries for current user. 197 * Shows read entries for current user.
208 * 198 *
209 * @param Request $request 199 * @param int $page
210 * @param int $page
211 * 200 *
212 * @Route("/archive/list/{page}", name="archive", defaults={"page" = "1"}) 201 * @Route("/archive/list/{page}", name="archive", defaults={"page" = "1"})
213 * 202 *
@@ -221,8 +210,7 @@ class EntryController extends Controller
221 /** 210 /**
222 * Shows starred entries for current user. 211 * Shows starred entries for current user.
223 * 212 *
224 * @param Request $request 213 * @param int $page
225 * @param int $page
226 * 214 *
227 * @Route("/starred/list/{page}", name="starred", defaults={"page" = "1"}) 215 * @Route("/starred/list/{page}", name="starred", defaults={"page" = "1"})
228 * 216 *
@@ -236,8 +224,7 @@ class EntryController extends Controller
236 /** 224 /**
237 * Shows untagged articles for current user. 225 * Shows untagged articles for current user.
238 * 226 *
239 * @param Request $request 227 * @param int $page
240 * @param int $page
241 * 228 *
242 * @Route("/untagged/list/{page}", name="untagged", defaults={"page" = "1"}) 229 * @Route("/untagged/list/{page}", name="untagged", defaults={"page" = "1"})
243 * 230 *
@@ -276,8 +263,6 @@ class EntryController extends Controller
276 /** 263 /**
277 * Shows entry content. 264 * Shows entry content.
278 * 265 *
279 * @param Entry $entry
280 *
281 * @Route("/view/{id}", requirements={"id" = "\d+"}, name="view") 266 * @Route("/view/{id}", requirements={"id" = "\d+"}, name="view")
282 * 267 *
283 * @return \Symfony\Component\HttpFoundation\Response 268 * @return \Symfony\Component\HttpFoundation\Response
@@ -296,8 +281,6 @@ class EntryController extends Controller
296 * Reload an entry. 281 * Reload an entry.
297 * Refetch content from the website and make it readable again. 282 * Refetch content from the website and make it readable again.
298 * 283 *
299 * @param Entry $entry
300 *
301 * @Route("/reload/{id}", requirements={"id" = "\d+"}, name="reload_entry") 284 * @Route("/reload/{id}", requirements={"id" = "\d+"}, name="reload_entry")
302 * 285 *
303 * @return \Symfony\Component\HttpFoundation\RedirectResponse 286 * @return \Symfony\Component\HttpFoundation\RedirectResponse
@@ -330,9 +313,6 @@ class EntryController extends Controller
330 /** 313 /**
331 * Changes read status for an entry. 314 * Changes read status for an entry.
332 * 315 *
333 * @param Request $request
334 * @param Entry $entry
335 *
336 * @Route("/archive/{id}", requirements={"id" = "\d+"}, name="archive_entry") 316 * @Route("/archive/{id}", requirements={"id" = "\d+"}, name="archive_entry")
337 * 317 *
338 * @return \Symfony\Component\HttpFoundation\RedirectResponse 318 * @return \Symfony\Component\HttpFoundation\RedirectResponse
@@ -362,9 +342,6 @@ class EntryController extends Controller
362 /** 342 /**
363 * Changes starred status for an entry. 343 * Changes starred status for an entry.
364 * 344 *
365 * @param Request $request
366 * @param Entry $entry
367 *
368 * @Route("/star/{id}", requirements={"id" = "\d+"}, name="star_entry") 345 * @Route("/star/{id}", requirements={"id" = "\d+"}, name="star_entry")
369 * 346 *
370 * @return \Symfony\Component\HttpFoundation\RedirectResponse 347 * @return \Symfony\Component\HttpFoundation\RedirectResponse
@@ -395,8 +372,6 @@ class EntryController extends Controller
395 /** 372 /**
396 * Deletes entry and redirect to the homepage or the last viewed page. 373 * Deletes entry and redirect to the homepage or the last viewed page.
397 * 374 *
398 * @param Entry $entry
399 *
400 * @Route("/delete/{id}", requirements={"id" = "\d+"}, name="delete_entry") 375 * @Route("/delete/{id}", requirements={"id" = "\d+"}, name="delete_entry")
401 * 376 *
402 * @return \Symfony\Component\HttpFoundation\RedirectResponse 377 * @return \Symfony\Component\HttpFoundation\RedirectResponse
@@ -437,8 +412,6 @@ class EntryController extends Controller
437 /** 412 /**
438 * Get public URL for entry (and generate it if necessary). 413 * Get public URL for entry (and generate it if necessary).
439 * 414 *
440 * @param Entry $entry
441 *
442 * @Route("/share/{id}", requirements={"id" = "\d+"}, name="share") 415 * @Route("/share/{id}", requirements={"id" = "\d+"}, name="share")
443 * 416 *
444 * @return \Symfony\Component\HttpFoundation\Response 417 * @return \Symfony\Component\HttpFoundation\Response
@@ -463,8 +436,6 @@ class EntryController extends Controller
463 /** 436 /**
464 * Disable public sharing for an entry. 437 * Disable public sharing for an entry.
465 * 438 *
466 * @param Entry $entry
467 *
468 * @Route("/share/delete/{id}", requirements={"id" = "\d+"}, name="delete_share") 439 * @Route("/share/delete/{id}", requirements={"id" = "\d+"}, name="delete_share")
469 * 440 *
470 * @return \Symfony\Component\HttpFoundation\Response 441 * @return \Symfony\Component\HttpFoundation\Response
@@ -487,8 +458,6 @@ class EntryController extends Controller
487 /** 458 /**
488 * Ability to view a content publicly. 459 * Ability to view a content publicly.
489 * 460 *
490 * @param Entry $entry
491 *
492 * @Route("/share/{uid}", requirements={"uid" = ".+"}, name="share_entry") 461 * @Route("/share/{uid}", requirements={"uid" = ".+"}, name="share_entry")
493 * @Cache(maxage="25200", smaxage="25200", public=true) 462 * @Cache(maxage="25200", smaxage="25200", public=true)
494 * 463 *
@@ -510,9 +479,8 @@ class EntryController extends Controller
510 * Global method to retrieve entries depending on the given type 479 * Global method to retrieve entries depending on the given type
511 * It returns the response to be send. 480 * It returns the response to be send.
512 * 481 *
513 * @param string $type Entries type: unread, starred or archive 482 * @param string $type Entries type: unread, starred or archive
514 * @param Request $request 483 * @param int $page
515 * @param int $page
516 * 484 *
517 * @return \Symfony\Component\HttpFoundation\Response 485 * @return \Symfony\Component\HttpFoundation\Response
518 */ 486 */
@@ -582,7 +550,6 @@ class EntryController extends Controller
582 * Fetch content and update entry. 550 * Fetch content and update entry.
583 * In case it fails, $entry->getContent will return an error message. 551 * In case it fails, $entry->getContent will return an error message.
584 * 552 *
585 * @param Entry $entry
586 * @param string $prefixMessage Should be the translation key: entry_saved or entry_reloaded 553 * @param string $prefixMessage Should be the translation key: entry_saved or entry_reloaded
587 */ 554 */
588 private function updateEntry(Entry $entry, $prefixMessage = 'entry_saved') 555 private function updateEntry(Entry $entry, $prefixMessage = 'entry_saved')
@@ -613,8 +580,6 @@ class EntryController extends Controller
613 580
614 /** 581 /**
615 * Check if the logged user can manage the given entry. 582 * Check if the logged user can manage the given entry.
616 *
617 * @param Entry $entry
618 */ 583 */
619 private function checkUserAction(Entry $entry) 584 private function checkUserAction(Entry $entry)
620 { 585 {
@@ -626,8 +591,6 @@ class EntryController extends Controller
626 /** 591 /**
627 * Check for existing entry, if it exists, redirect to it with a message. 592 * Check for existing entry, if it exists, redirect to it with a message.
628 * 593 *
629 * @param Entry $entry
630 *
631 * @return Entry|bool 594 * @return Entry|bool
632 */ 595 */
633 private function checkIfEntryAlreadyExists(Entry $entry) 596 private function checkIfEntryAlreadyExists(Entry $entry)