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
{
{
$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);
{
$this->checkUserAction($entry);
- $entry->setDeleted(1);
- $this->getDoctrine()->getManager()->flush();
+ $em = $this->getDoctrine()->getManager();
+ $em->remove($entry);
+ $em->flush();
$this->get('session')->getFlashBag()->add(
'notice',