@@ 14-62 (lines=49) @@ | ||
11 | /** |
|
12 | * This class represents the type for the MultiLineTextPagePart |
|
13 | */ |
|
14 | class MultiLineTextPagePartAdminType extends AbstractType |
|
15 | { |
|
16 | /** |
|
17 | * @param FormBuilderInterface $builder The form builder |
|
18 | * @param array $options The options |
|
19 | */ |
|
20 | public function buildForm(FormBuilderInterface $builder, array $options) |
|
21 | { |
|
22 | $builder |
|
23 | ->add('label', TextType::class, array( |
|
24 | 'required' => true, |
|
25 | 'label' => 'kuma_form.form.multi_line_text_page_part.label.label', |
|
26 | )) |
|
27 | ->add('required', CheckboxType::class, array( |
|
28 | 'required' => false, |
|
29 | 'label' => 'kuma_form.form.multi_line_text_page_part.required.label', |
|
30 | )) |
|
31 | ->add('errormessage_required', TextType::class, array( |
|
32 | 'required' => false, |
|
33 | 'label' => 'kuma_form.form.multi_line_text_page_part.errormessage_required.label', |
|
34 | )) |
|
35 | ->add('regex', TextType::class, array( |
|
36 | 'required' => false, |
|
37 | 'label' => 'kuma_form.form.multi_line_text_page_part.regex.label', |
|
38 | )) |
|
39 | ->add('errormessage_regex', TextType::class, array( |
|
40 | 'required' => false, |
|
41 | 'label' => 'kuma_form.form.multi_line_text_page_part.errormessage_regex.label', |
|
42 | )) |
|
43 | ; |
|
44 | } |
|
45 | ||
46 | /** |
|
47 | * @return string |
|
48 | */ |
|
49 | public function getBlockPrefix() |
|
50 | { |
|
51 | return 'kunstmaan_formbundle_singlelinetextpageparttype'; |
|
52 | } |
|
53 | ||
54 | /** |
|
55 | * @param OptionsResolver $resolver |
|
56 | */ |
|
57 | public function configureOptions(OptionsResolver $resolver) |
|
58 | { |
|
59 | $resolver->setDefaults(array('data_class' => 'Kunstmaan\FormBundle\Entity\PageParts\MultiLineTextPagePart')); |
|
60 | } |
|
61 | } |
|
62 |
@@ 14-60 (lines=47) @@ | ||
11 | /** |
|
12 | * This class represents the type for the SubleLineTextPagePart |
|
13 | */ |
|
14 | class SingleLineTextPagePartAdminType extends AbstractType |
|
15 | { |
|
16 | /** |
|
17 | * @param FormBuilderInterface $builder The form builder |
|
18 | * @param array $options The options |
|
19 | */ |
|
20 | public function buildForm(FormBuilderInterface $builder, array $options) |
|
21 | { |
|
22 | $builder |
|
23 | ->add( |
|
24 | 'label', |
|
25 | TextType::class, |
|
26 | [ |
|
27 | 'required' => true, |
|
28 | 'label' => 'kuma_form.form.single_line_text_page_part.label.label', |
|
29 | ] |
|
30 | ) |
|
31 | ->add( |
|
32 | 'required', |
|
33 | CheckboxType::class, |
|
34 | [ |
|
35 | 'required' => false, |
|
36 | 'label' => 'kuma_form.form.single_line_text_page_part.required.label', |
|
37 | ] |
|
38 | ) |
|
39 | ->add( |
|
40 | 'errormessage_required', |
|
41 | TextType::class, |
|
42 | [ |
|
43 | 'required' => false, |
|
44 | 'label' => 'kuma_form.form.single_line_text_page_part.errormessage_required.label', |
|
45 | ] |
|
46 | ) |
|
47 | ->add( |
|
48 | 'regex', |
|
49 | TextType::class, |
|
50 | [ |
|
51 | 'required' => false, |
|
52 | 'label' => 'kuma_form.form.single_line_text_page_part.regex.label', |
|
53 | ] |
|
54 | ) |
|
55 | ->add( |
|
56 | 'errormessage_regex', |
|
57 | TextType::class, |
|
58 | [ |
|
59 | 'required' => false, |
|
60 | 'label' => 'kuma_form.form.single_line_text_page_part.errormessage_regex.label', |
|
61 | ] |
|
62 | ); |
|
63 | } |