aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Controller/EntryController.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/Wallabag/CoreBundle/Controller/EntryController.php')
-rw-r--r--src/Wallabag/CoreBundle/Controller/EntryController.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/Wallabag/CoreBundle/Controller/EntryController.php b/src/Wallabag/CoreBundle/Controller/EntryController.php
index 3d22c7bc..aa70307b 100644
--- a/src/Wallabag/CoreBundle/Controller/EntryController.php
+++ b/src/Wallabag/CoreBundle/Controller/EntryController.php
@@ -2,16 +2,16 @@
2 2
3namespace Wallabag\CoreBundle\Controller; 3namespace Wallabag\CoreBundle\Controller;
4 4
5use Pagerfanta\Adapter\DoctrineORMAdapter;
6use Pagerfanta\Pagerfanta;
5use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; 7use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
6use Symfony\Bundle\FrameworkBundle\Controller\Controller; 8use Symfony\Bundle\FrameworkBundle\Controller\Controller;
7use Symfony\Component\HttpFoundation\Request; 9use Symfony\Component\HttpFoundation\Request;
8use Symfony\Component\Routing\Generator\UrlGeneratorInterface; 10use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
9use Wallabag\CoreBundle\Entity\Entry; 11use Wallabag\CoreBundle\Entity\Entry;
10use Wallabag\CoreBundle\Form\Type\NewEntryType;
11use Wallabag\CoreBundle\Form\Type\EditEntryType;
12use Wallabag\CoreBundle\Filter\EntryFilterType; 12use Wallabag\CoreBundle\Filter\EntryFilterType;
13use Pagerfanta\Adapter\DoctrineORMAdapter; 13use Wallabag\CoreBundle\Form\Type\EditEntryType;
14use Pagerfanta\Pagerfanta; 14use Wallabag\CoreBundle\Form\Type\NewEntryType;
15 15
16class EntryController extends Controller 16class EntryController extends Controller
17{ 17{
@@ -43,7 +43,7 @@ class EntryController extends Controller
43 { 43 {
44 $entry = new Entry($this->getUser()); 44 $entry = new Entry($this->getUser());
45 45
46 $form = $this->createForm(new NewEntryType(), $entry); 46 $form = $this->createForm(NewEntryType::class, $entry);
47 47
48 $form->handleRequest($request); 48 $form->handleRequest($request);
49 49
@@ -117,7 +117,7 @@ class EntryController extends Controller
117 { 117 {
118 $this->checkUserAction($entry); 118 $this->checkUserAction($entry);
119 119
120 $form = $this->createForm(new EditEntryType(), $entry); 120 $form = $this->createForm(EditEntryType::class, $entry);
121 121
122 $form->handleRequest($request); 122 $form->handleRequest($request);
123 123
@@ -239,7 +239,7 @@ class EntryController extends Controller
239 throw new \InvalidArgumentException(sprintf('Type "%s" is not implemented.', $type)); 239 throw new \InvalidArgumentException(sprintf('Type "%s" is not implemented.', $type));
240 } 240 }
241 241
242 $form = $this->get('form.factory')->create(new EntryFilterType($repository, $this->getUser())); 242 $form = $this->createForm(EntryFilterType::class);
243 243
244 if ($request->query->has($form->getName())) { 244 if ($request->query->has($form->getName())) {
245 // manually bind values from the request 245 // manually bind values from the request