]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Controller/ExportController.php
Added route to list entries with annotations
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Controller / ExportController.php
index cec8d4999a621032cb3b6748ac30fe188a5d180c..8517e7a91763dd6b5761bdbfa89395a806087ea3 100644 (file)
@@ -47,7 +47,7 @@ class ExportController extends Controller
      *
      * @Route("/export/{category}.{format}", name="export_entries", requirements={
      *     "format": "epub|mobi|pdf|json|xml|txt|csv",
-     *     "category": "all|unread|starred|archive|tag_entries|untagged|search"
+     *     "category": "all|unread|starred|archive|tag_entries|untagged|search|with_annotations"
      * })
      *
      * @return \Symfony\Component\HttpFoundation\Response
@@ -80,6 +80,13 @@ class ExportController extends Controller
              ->getResult();
 
             $title = 'Search ' . $searchTerm;
+        } elseif ('with_annotations' === $category) {
+            $entries = $repository->getBuilderForAnnotationsByUser(
+                $this->getUser()->getId()
+            )->getQuery()
+             ->getResult();
+
+            $title = 'With annotations';
         } else {
             $entries = $repository
                 ->$methodBuilder($this->getUser()->getId())