diff options
Diffstat (limited to 'src/Wallabag/CoreBundle/Controller/EntryController.php')
-rw-r--r-- | src/Wallabag/CoreBundle/Controller/EntryController.php | 14 |
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 | ||
3 | namespace Wallabag\CoreBundle\Controller; | 3 | namespace Wallabag\CoreBundle\Controller; |
4 | 4 | ||
5 | use Pagerfanta\Adapter\DoctrineORMAdapter; | ||
6 | use Pagerfanta\Pagerfanta; | ||
5 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; | 7 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; |
6 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; | 8 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; |
7 | use Symfony\Component\HttpFoundation\Request; | 9 | use Symfony\Component\HttpFoundation\Request; |
8 | use Symfony\Component\Routing\Generator\UrlGeneratorInterface; | 10 | use Symfony\Component\Routing\Generator\UrlGeneratorInterface; |
9 | use Wallabag\CoreBundle\Entity\Entry; | 11 | use Wallabag\CoreBundle\Entity\Entry; |
10 | use Wallabag\CoreBundle\Form\Type\NewEntryType; | ||
11 | use Wallabag\CoreBundle\Form\Type\EditEntryType; | ||
12 | use Wallabag\CoreBundle\Filter\EntryFilterType; | 12 | use Wallabag\CoreBundle\Filter\EntryFilterType; |
13 | use Pagerfanta\Adapter\DoctrineORMAdapter; | 13 | use Wallabag\CoreBundle\Form\Type\EditEntryType; |
14 | use Pagerfanta\Pagerfanta; | 14 | use Wallabag\CoreBundle\Form\Type\NewEntryType; |
15 | 15 | ||
16 | class EntryController extends Controller | 16 | class 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 |