Total Complexity | 2 |
Total Lines | 46 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
14 | final class PropertyDescriptionType extends AbstractType |
||
15 | { |
||
16 | /** |
||
17 | * {@inheritdoc} |
||
18 | */ |
||
19 | public function buildForm(FormBuilderInterface $builder, array $options): void |
||
20 | { |
||
21 | $builder |
||
22 | ->add('title', null, [ |
||
23 | 'label' => 'label.title', |
||
24 | 'attr' => [ |
||
25 | 'required' => true, |
||
26 | ], |
||
27 | 'label_attr' => [ |
||
28 | 'class' => 'required', |
||
29 | ], |
||
30 | 'constraints' => [ |
||
31 | new NotNull(), |
||
32 | ], |
||
33 | ]) |
||
34 | ->add('meta_title', null, [ |
||
35 | 'label' => 'label.meta_title', |
||
36 | ]) |
||
37 | ->add('meta_description', null, [ |
||
38 | 'label' => 'label.meta_description', |
||
39 | ]) |
||
40 | ->add('content', TextareaType::class, [ |
||
41 | 'attr' => [ |
||
42 | 'class' => 'form-control summer-note', |
||
43 | 'rows' => '7', |
||
44 | 'required' => true, |
||
45 | ], |
||
46 | 'label' => 'label.content', |
||
47 | 'constraints' => [ |
||
48 | new NotNull(), |
||
49 | ], |
||
50 | ]); |
||
51 | } |
||
52 | |||
53 | /** |
||
54 | * {@inheritdoc} |
||
55 | */ |
||
56 | public function configureOptions(OptionsResolver $resolver): void |
||
60 | ]); |
||
61 | } |
||
63 |