diff options
author | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2015-06-08 16:35:41 +0200 |
---|---|---|
committer | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2015-06-08 16:35:41 +0200 |
commit | 9b9b05008a96a45bbf6da4c0c1c1b1244b83c6af (patch) | |
tree | 8b73ad50783cf8066ec4171367e2dd1e26026636 /src/Wallabag/CoreBundle/Form/Type/NewEntryType.php | |
parent | 3cf22a05416b9994aa458ea045d232264006e7cf (diff) | |
parent | ac9d58211e1c6676485ef15d023215e5a465f3a8 (diff) | |
download | wallabag-9b9b05008a96a45bbf6da4c0c1c1b1244b83c6af.tar.gz wallabag-9b9b05008a96a45bbf6da4c0c1c1b1244b83c6af.tar.zst wallabag-9b9b05008a96a45bbf6da4c0c1c1b1244b83c6af.zip |
Merge branch 'v2-edit-title' into v2
Diffstat (limited to 'src/Wallabag/CoreBundle/Form/Type/NewEntryType.php')
-rw-r--r-- | src/Wallabag/CoreBundle/Form/Type/NewEntryType.php | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/Wallabag/CoreBundle/Form/Type/NewEntryType.php b/src/Wallabag/CoreBundle/Form/Type/NewEntryType.php new file mode 100644 index 00000000..cb96d11a --- /dev/null +++ b/src/Wallabag/CoreBundle/Form/Type/NewEntryType.php | |||
@@ -0,0 +1,30 @@ | |||
1 | <?php | ||
2 | |||
3 | namespace Wallabag\CoreBundle\Form\Type; | ||
4 | |||
5 | use Symfony\Component\Form\AbstractType; | ||
6 | use Symfony\Component\Form\FormBuilderInterface; | ||
7 | use Symfony\Component\OptionsResolver\OptionsResolver; | ||
8 | |||
9 | class NewEntryType extends AbstractType | ||
10 | { | ||
11 | public function buildForm(FormBuilderInterface $builder, array $options) | ||
12 | { | ||
13 | $builder | ||
14 | ->add('url', 'url', array('required' => true)) | ||
15 | ->add('save', 'submit') | ||
16 | ; | ||
17 | } | ||
18 | |||
19 | public function configureOptions(OptionsResolver $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 | } | ||