]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Controller/EntryController.php
First draft
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Controller / EntryController.php
index 9b2954e7d5d0525711ac4a61dec9cbae3f6eeda1..5fc6fc555e71ff6d9a7b1ffab3f07db333ed290b 100644 (file)
@@ -7,6 +7,7 @@ use Pagerfanta\Adapter\DoctrineORMAdapter;
 use Pagerfanta\Exception\OutOfRangeCurrentPageException;
 use Sensio\Bundle\FrameworkExtraBundle\Configuration\Cache;
 use Symfony\Bundle\FrameworkBundle\Controller\Controller;
+use Symfony\Component\HttpFoundation\JsonResponse;
 use Symfony\Component\HttpFoundation\Request;
 use Symfony\Component\Routing\Annotation\Route;
 use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
@@ -371,6 +372,11 @@ class EntryController extends Controller
             $message = 'flashes.entry.notice.entry_archived';
         }
 
+        if ($request->query->get('some_var_name')) {
+
+            return new JsonResponse($this->get('translator')->trans($message));
+        }
+
         $this->get('session')->getFlashBag()->add(
             'notice',
             $message
@@ -381,6 +387,8 @@ class EntryController extends Controller
         return $this->redirect($redirectUrl);
     }
 
+    
+
     /**
      * Changes starred status for an entry.
      *