aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/ApiBundle/Controller
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2016-01-15 15:38:31 +0100
committerNicolas LÅ“uillet <nicolas@loeuillet.org>2016-01-15 15:38:31 +0100
commit1930c19d8214c05ceefac5ac011a6b6e7e4a983d (patch)
tree8f07ffa139c7c2e883a560ef7dbb35a76adfb8dd /src/Wallabag/ApiBundle/Controller
parent790573d45899504bdecd2573c8f64018e23b139e (diff)
parent131eaa3e94ace8d75d6218e5c7c3aa58d5bb5009 (diff)
downloadwallabag-1930c19d8214c05ceefac5ac011a6b6e7e4a983d.tar.gz
wallabag-1930c19d8214c05ceefac5ac011a6b6e7e4a983d.tar.zst
wallabag-1930c19d8214c05ceefac5ac011a6b6e7e4a983d.zip
Merge pull request #1524 from wallabag/sf2.8
Upgrade to Symfony 3.0
Diffstat (limited to 'src/Wallabag/ApiBundle/Controller')
-rw-r--r--src/Wallabag/ApiBundle/Controller/WallabagRestController.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Wallabag/ApiBundle/Controller/WallabagRestController.php b/src/Wallabag/ApiBundle/Controller/WallabagRestController.php
index 354a6f8e..d9035cac 100644
--- a/src/Wallabag/ApiBundle/Controller/WallabagRestController.php
+++ b/src/Wallabag/ApiBundle/Controller/WallabagRestController.php
@@ -3,13 +3,14 @@
3namespace Wallabag\ApiBundle\Controller; 3namespace Wallabag\ApiBundle\Controller;
4 4
5use FOS\RestBundle\Controller\FOSRestController; 5use FOS\RestBundle\Controller\FOSRestController;
6use Hateoas\Configuration\Route;
7use Hateoas\Representation\Factory\PagerfantaFactory;
6use Nelmio\ApiDocBundle\Annotation\ApiDoc; 8use Nelmio\ApiDocBundle\Annotation\ApiDoc;
7use Symfony\Component\HttpFoundation\Request; 9use Symfony\Component\HttpFoundation\Request;
8use Symfony\Component\HttpFoundation\Response; 10use Symfony\Component\HttpFoundation\Response;
11use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
9use Wallabag\CoreBundle\Entity\Entry; 12use Wallabag\CoreBundle\Entity\Entry;
10use Wallabag\CoreBundle\Entity\Tag; 13use Wallabag\CoreBundle\Entity\Tag;
11use Hateoas\Configuration\Route;
12use Hateoas\Representation\Factory\PagerfantaFactory;
13 14
14class WallabagRestController extends FOSRestController 15class WallabagRestController extends FOSRestController
15{ 16{
@@ -84,7 +85,7 @@ class WallabagRestController extends FOSRestController
84 $pagerfantaFactory = new PagerfantaFactory('page', 'perPage'); 85 $pagerfantaFactory = new PagerfantaFactory('page', 'perPage');
85 $paginatedCollection = $pagerfantaFactory->createRepresentation( 86 $paginatedCollection = $pagerfantaFactory->createRepresentation(
86 $pager, 87 $pager,
87 new Route('api_get_entries', [], $absolute = true) 88 new Route('api_get_entries', [], UrlGeneratorInterface::ABSOLUTE_URL)
88 ); 89 );
89 90
90 $json = $this->get('serializer')->serialize($paginatedCollection, 'json'); 91 $json = $this->get('serializer')->serialize($paginatedCollection, 'json');