]>
Commit | Line | Data |
---|---|---|
7781faa0 | 1 | <?php |
4346a860 | 2 | |
7781faa0 J |
3 | namespace Wallabag\CoreBundle\Form\Type; |
4 | ||
5 | use Symfony\Component\Form\AbstractType; | |
6 | use Symfony\Component\Form\FormBuilderInterface; | |
7 | use Symfony\Component\OptionsResolver\OptionsResolverInterface; | |
8 | ||
9 | class EntryType extends AbstractType | |
10 | { | |
11 | public function buildForm(FormBuilderInterface $builder, array $options) | |
12 | { | |
13 | $builder | |
14 | ->add('url', 'url') | |
15 | ->add('save', 'submit') | |
16 | ; | |
17 | } | |
18 | ||
19 | public function setDefaultOptions(OptionsResolverInterface $resolver) | |
20 | { | |
21 | $resolver->setDefaults(array( | |
22 | 'data_class' => 'Wallabag\CoreBundle\Entity\Entry', | |
23 | )); | |
24 | } | |
25 | ||
26 | public function getName() | |
27 | { | |
28 | return 'entry'; | |
29 | } | |
30 | } |