]> git.immae.eu Git - github/wallabag/wallabag.git/blob - src/Wallabag/CoreBundle/Form/Type/EntryType.php
cfd64473511a1b16240ade86fcd690ceb043e182
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Form / Type / EntryType.php
1 <?php
2 namespace Wallabag\CoreBundle\Form\Type;
3
4 use Symfony\Component\Form\AbstractType;
5 use Symfony\Component\Form\FormBuilderInterface;
6 use Symfony\Component\OptionsResolver\OptionsResolverInterface;
7
8 class EntryType extends AbstractType
9 {
10 public function buildForm(FormBuilderInterface $builder, array $options)
11 {
12 $builder
13 ->add('url', 'url')
14 ->add('save', 'submit')
15 ;
16 }
17
18 public function setDefaultOptions(OptionsResolverInterface $resolver)
19 {
20 $resolver->setDefaults(array(
21 'data_class' => 'Wallabag\CoreBundle\Entity\Entry',
22 ));
23 }
24
25 public function getName()
26 {
27 return 'entry';
28 }
29 }