]> git.immae.eu Git - github/wallabag/wallabag.git/blob - src/Wallabag/CoreBundle/Form/Type/NewEntryType.php
Merge pull request #1583 from wallabag/v2-fix-delete
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Form / Type / NewEntryType.php
1 <?php
2
3 namespace Wallabag\CoreBundle\Form\Type;
4
5 use Symfony\Component\Form\AbstractType;
6 use Symfony\Component\Form\Extension\Core\Type\SubmitType;
7 use Symfony\Component\Form\Extension\Core\Type\UrlType;
8 use Symfony\Component\Form\FormBuilderInterface;
9 use Symfony\Component\OptionsResolver\OptionsResolver;
10
11 class NewEntryType extends AbstractType
12 {
13 public function buildForm(FormBuilderInterface $builder, array $options)
14 {
15 $builder
16 ->add('url', UrlType::class, array('required' => true))
17 ->add('save', SubmitType::class)
18 ;
19 }
20
21 public function configureOptions(OptionsResolver $resolver)
22 {
23 $resolver->setDefaults(array(
24 'data_class' => 'Wallabag\CoreBundle\Entity\Entry',
25 ));
26 }
27
28 public function getBlockPrefix()
29 {
30 return 'entry';
31 }
32 }