aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Form/Type/NewEntryType.php
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2015-06-02 18:54:34 +0200
committerJeremy Benoist <jeremy.benoist@gmail.com>2015-06-02 18:56:07 +0200
commit82d6d9cb06a1486e2e3b05fa6ce857b3b8655180 (patch)
tree973017b934f12bed3a46cc23b30446a41c9ff7d8 /src/Wallabag/CoreBundle/Form/Type/NewEntryType.php
parent51d9699fa130a18a1c5cd09d1b03a382d73e91db (diff)
downloadwallabag-82d6d9cb06a1486e2e3b05fa6ce857b3b8655180.tar.gz
wallabag-82d6d9cb06a1486e2e3b05fa6ce857b3b8655180.tar.zst
wallabag-82d6d9cb06a1486e2e3b05fa6ce857b3b8655180.zip
Add basic title edition
Fix #218 I mean basic, because there is no javascript at all. It could be a nice edit-in-place. But for the moment, it is simple.
Diffstat (limited to 'src/Wallabag/CoreBundle/Form/Type/NewEntryType.php')
-rw-r--r--src/Wallabag/CoreBundle/Form/Type/NewEntryType.php30
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..a2d203ea
--- /dev/null
+++ b/src/Wallabag/CoreBundle/Form/Type/NewEntryType.php
@@ -0,0 +1,30 @@
1<?php
2
3namespace Wallabag\CoreBundle\Form\Type;
4
5use Symfony\Component\Form\AbstractType;
6use Symfony\Component\Form\FormBuilderInterface;
7use Symfony\Component\OptionsResolver\OptionsResolverInterface;
8
9class 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 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}