aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Controller/ExportController.php
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2015-10-30 20:57:10 +0100
committerNicolas LÅ“uillet <nicolas.loeuillet@smile.fr>2015-11-09 16:32:48 +0100
commitcceca9ea1d93ccf1420c2506330a16dc07f6433c (patch)
treee7105fc685d074ada622b55398dc9c7c2a475a2e /src/Wallabag/CoreBundle/Controller/ExportController.php
parent268e9e7277d470dbd65b4eaa70c247ef35a95a3d (diff)
downloadwallabag-cceca9ea1d93ccf1420c2506330a16dc07f6433c.tar.gz
wallabag-cceca9ea1d93ccf1420c2506330a16dc07f6433c.tar.zst
wallabag-cceca9ea1d93ccf1420c2506330a16dc07f6433c.zip
Fix route parameters
Improve export tests Improve CSV export
Diffstat (limited to 'src/Wallabag/CoreBundle/Controller/ExportController.php')
-rw-r--r--src/Wallabag/CoreBundle/Controller/ExportController.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/Wallabag/CoreBundle/Controller/ExportController.php b/src/Wallabag/CoreBundle/Controller/ExportController.php
index dd3cb7ca..c8ef49a2 100644
--- a/src/Wallabag/CoreBundle/Controller/ExportController.php
+++ b/src/Wallabag/CoreBundle/Controller/ExportController.php
@@ -7,6 +7,10 @@ use Symfony\Bundle\FrameworkBundle\Controller\Controller;
7use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; 7use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
8use Wallabag\CoreBundle\Entity\Entry; 8use Wallabag\CoreBundle\Entity\Entry;
9 9
10/**
11 * The try/catch can be removed once all formats will be implemented.
12 * Still need implementation: txt.
13 */
10class ExportController extends Controller 14class ExportController extends Controller
11{ 15{
12 /** 16 /**
@@ -14,7 +18,10 @@ class ExportController extends Controller
14 * 18 *
15 * @param Entry $entry 19 * @param Entry $entry
16 * 20 *
17 * @Route("/export/{id}.{format}", requirements={"id" = "\d+"}, name="export_entry") 21 * @Route("/export/{id}.{format}", name="export_entry", requirements={
22 * "format": "epub|mobi|pdf|json|xml|txt|csv",
23 * "id": "\d+"
24 * })
18 */ 25 */
19 public function downloadEntryAction(Entry $entry, $format) 26 public function downloadEntryAction(Entry $entry, $format)
20 { 27 {
@@ -32,7 +39,7 @@ class ExportController extends Controller
32 * Export all entries for current user. 39 * Export all entries for current user.
33 * 40 *
34 * @Route("/export/{category}.{format}", name="export_entries", requirements={ 41 * @Route("/export/{category}.{format}", name="export_entries", requirements={
35 * "_format": "epub|mobi|pdf|json|xml|txt|csv", 42 * "format": "epub|mobi|pdf|json|xml|txt|csv",
36 * "category": "all|unread|starred|archive" 43 * "category": "all|unread|starred|archive"
37 * }) 44 * })
38 */ 45 */