mirror of
https://github.com/wallabag/wallabag.git
synced 2025-07-17 17:08:37 +00:00
Use a form type for entry
This commit is contained in:
parent
78cedc2262
commit
7781faa0b0
3 changed files with 32 additions and 6 deletions
|
@ -7,7 +7,7 @@ use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
|||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Wallabag\CoreBundle\Entity\Entry;
|
||||
use Wallabag\CoreBundle\Service\Extractor;
|
||||
use Wallabag\CoreBundle\Helper\Url;
|
||||
use Wallabag\CoreBundle\Form\Type\EntryType;
|
||||
|
||||
class EntryController extends Controller
|
||||
{
|
||||
|
@ -22,10 +22,7 @@ class EntryController extends Controller
|
|||
{
|
||||
$entry = new Entry($this->getUser());
|
||||
|
||||
$form = $this->createFormBuilder($entry)
|
||||
->add('url', 'url')
|
||||
->add('save', 'submit')
|
||||
->getForm();
|
||||
$form = $this->createForm(new EntryType(), $entry);
|
||||
|
||||
$form->handleRequest($request);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue