diff options
Diffstat (limited to 'src/Wallabag/CoreBundle/Controller')
-rw-r--r-- | src/Wallabag/CoreBundle/Controller/ExportController.php | 11 |
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; | |||
7 | use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; | 7 | use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; |
8 | use Wallabag\CoreBundle\Entity\Entry; | 8 | use 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 | */ | ||
10 | class ExportController extends Controller | 14 | class 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 | */ |