@@ 13-43 (lines=31) @@ | ||
10 | /** |
|
11 | * This class represents the type for the SubmitButtonPagePart |
|
12 | */ |
|
13 | class SubmitButtonPagePartAdminType extends AbstractType |
|
14 | { |
|
15 | /** |
|
16 | * @param FormBuilderInterface $builder |
|
17 | * @param array $options |
|
18 | */ |
|
19 | public function buildForm(FormBuilderInterface $builder, array $options) |
|
20 | { |
|
21 | $builder |
|
22 | ->add('label', TextType::class, array( |
|
23 | 'required' => true, |
|
24 | 'label' => 'kuma_form.form.submit_button_page_part.label.label' |
|
25 | )); |
|
26 | } |
|
27 | ||
28 | /** |
|
29 | * @return string |
|
30 | */ |
|
31 | public function getBlockPrefix() |
|
32 | { |
|
33 | return 'kunstmaan_formbundle_singlelinetextpageparttype'; |
|
34 | } |
|
35 | ||
36 | /** |
|
37 | * @param OptionsResolver $resolver |
|
38 | */ |
|
39 | public function configureOptions(OptionsResolver $resolver) |
|
40 | { |
|
41 | $resolver->setDefaults(array('data_class' => 'Kunstmaan\FormBundle\Entity\PageParts\SubmitButtonPagePart')); |
|
42 | } |
|
43 | } |
|
44 |
@@ 14-44 (lines=31) @@ | ||
11 | /** |
|
12 | * ControllerActionAdminType |
|
13 | */ |
|
14 | class ControllerActionAdminType extends AbstractType |
|
15 | { |
|
16 | ||
17 | /** |
|
18 | * @param FormBuilderInterface $builder |
|
19 | * @param array $options |
|
20 | */ |
|
21 | public function buildForm(FormBuilderInterface $builder, array $options) |
|
22 | { |
|
23 | $builder->add('id', HiddenType::class); |
|
24 | $builder->add('title', TextType::class, array( |
|
25 | 'label' => 'kuma_node.form.controller_action.title.label', |
|
26 | )); |
|
27 | } |
|
28 | ||
29 | public function configureOptions(OptionsResolver $resolver) |
|
30 | { |
|
31 | $resolver->setDefaults(array( |
|
32 | 'data_class' => 'Kunstmaan\NodeBundle\Entity\AbstractControllerAction', |
|
33 | )); |
|
34 | } |
|
35 | ||
36 | /** |
|
37 | * @return string |
|
38 | */ |
|
39 | public function getBlockPrefix() |
|
40 | { |
|
41 | return 'controller_action'; |
|
42 | } |
|
43 | ||
44 | } |
|
45 |
@@ 10-42 (lines=33) @@ | ||
7 | use Symfony\Component\Form\FormBuilderInterface; |
|
8 | use Symfony\Component\OptionsResolver\OptionsResolver; |
|
9 | ||
10 | class NodeSearchAdminType extends AbstractType |
|
11 | { |
|
12 | /** |
|
13 | * @param FormBuilderInterface $builder |
|
14 | * @param array $options |
|
15 | */ |
|
16 | public function buildForm(FormBuilderInterface $builder, array $options) |
|
17 | { |
|
18 | $builder->add('boost', TextType::class, array( |
|
19 | 'label' => 'node_search.form.search.boost.label', |
|
20 | )); |
|
21 | } |
|
22 | ||
23 | /** |
|
24 | * @return string |
|
25 | */ |
|
26 | public function getBlockPrefix() |
|
27 | { |
|
28 | return 'node_search'; |
|
29 | } |
|
30 | ||
31 | /** |
|
32 | * @param OptionsResolver $resolver |
|
33 | */ |
|
34 | public function configureOptions(OptionsResolver $resolver) |
|
35 | { |
|
36 | $resolver->setDefaults( |
|
37 | array( |
|
38 | 'data_class' => 'Kunstmaan\NodeSearchBundle\Entity\NodeSearch', |
|
39 | ) |
|
40 | ); |
|
41 | } |
|
42 | } |
|
43 |