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 1949bdf8..9dd904f1 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
@@ -116,7 +116,7 @@ class EntryController extends Controller
116 { 116 {
117 $this->checkUserAction($entry); 117 $this->checkUserAction($entry);
118 118
119 $form = $this->createForm(new EditEntryType(), $entry); 119 $form = $this->createForm(EditEntryType::class, $entry);
120 120
121 $form->handleRequest($request); 121 $form->handleRequest($request);
122 122
@@ -238,7 +238,7 @@ class EntryController extends Controller
238 throw new \InvalidArgumentException(sprintf('Type "%s" is not implemented.', $type)); 238 throw new \InvalidArgumentException(sprintf('Type "%s" is not implemented.', $type));
239 } 239 }
240 240
241 $form = $this->get('form.factory')->create(new EntryFilterType($repository, $this->getUser())); 241 $form = $this->createForm(EntryFilterType::class);
242 242
243 if ($request->query->has($form->getName())) { 243 if ($request->query->has($form->getName())) {
244 // manually bind values from the request 244 // manually bind values from the request