]> git.immae.eu Git - github/wallabag/wallabag.git/blame - src/Wallabag/CoreBundle/Form/Type/EditEntryType.php
Removed is_public in Entry edit form
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Form / Type / EditEntryType.php
CommitLineData
82d6d9cb
JB
1<?php
2
3namespace Wallabag\CoreBundle\Form\Type;
4
5use Symfony\Component\Form\AbstractType;
619cc453
JB
6use Symfony\Component\Form\Extension\Core\Type\SubmitType;
7use Symfony\Component\Form\Extension\Core\Type\TextType;
82d6d9cb
JB
8use Symfony\Component\Form\FormBuilderInterface;
9use Symfony\Component\OptionsResolver\OptionsResolver;
10
11class EditEntryType extends AbstractType
12{
13 public function buildForm(FormBuilderInterface $builder, array $options)
14 {
15 $builder
4094ea47 16 ->add('title', TextType::class, [
0d42217e
JB
17 'required' => true,
18 'label' => 'entry.edit.title_label',
4094ea47 19 ])
4094ea47 20 ->add('url', TextType::class, [
0d42217e
JB
21 'disabled' => true,
22 'required' => false,
23 'label' => 'entry.edit.url_label',
4094ea47
JB
24 ])
25 ->add('save', SubmitType::class, [
0d42217e 26 'label' => 'entry.edit.save_label',
4094ea47 27 ])
82d6d9cb
JB
28 ;
29 }
30
31 public function configureOptions(OptionsResolver $resolver)
32 {
4094ea47 33 $resolver->setDefaults([
82d6d9cb 34 'data_class' => 'Wallabag\CoreBundle\Entity\Entry',
4094ea47 35 ]);
82d6d9cb
JB
36 }
37
619cc453 38 public function getBlockPrefix()
82d6d9cb
JB
39 {
40 return 'entry';
41 }
42}