3 namespace Wallabag\CoreBundle\Form\Type
;
5 use Symfony\Component\Form\AbstractType
;
6 use Symfony\Component\Form\Extension\Core\Type\CheckboxType
;
7 use Symfony\Component\Form\Extension\Core\Type\SubmitType
;
8 use Symfony\Component\Form\Extension\Core\Type\TextType
;
9 use Symfony\Component\Form\FormBuilderInterface
;
10 use Symfony\Component\OptionsResolver\OptionsResolver
;
12 class EditEntryType
extends AbstractType
14 public function buildForm(FormBuilderInterface
$builder, array $options)
17 ->add('title', TextType
::class, array('required' => true))
18 ->add('is_public', CheckboxType
::class, array('required' => false))
19 // @todo: add autocomplete
20 // ->add('tags', 'entity', array(
21 // 'class' => 'Wallabag\CoreBundle\Entity\Tag',
22 // 'choice_translation_domain' => true,
24 ->add('save', SubmitType
::class)
28 public function configureOptions(OptionsResolver
$resolver)
30 $resolver->setDefaults(array(
31 'data_class' => 'Wallabag\CoreBundle\Entity\Entry',
35 public function getBlockPrefix()