@@ 13-42 (lines=30) @@ | ||
10 | /** |
|
11 | * DashboardConfigurationType |
|
12 | */ |
|
13 | class DashboardConfigurationType extends AbstractType |
|
14 | { |
|
15 | /** |
|
16 | * {@inheritdoc} |
|
17 | */ |
|
18 | public function buildForm(FormBuilderInterface $builder, array $options) |
|
19 | { |
|
20 | $builder->add('title', TextType::class, array( |
|
21 | 'label' => 'kuma_admin.dashboard.configuration.title.label', |
|
22 | )); |
|
23 | $builder->add('content', TextareaType::class, array( |
|
24 | 'label' => 'kuma_admin.dashboard.configuration.content.label', |
|
25 | 'required' => false, |
|
26 | 'attr' => array( |
|
27 | 'style' => 'width: 1000px', |
|
28 | 'rows' => 20, |
|
29 | ), |
|
30 | )); |
|
31 | } |
|
32 | ||
33 | /** |
|
34 | * {@inheritdoc} |
|
35 | */ |
|
36 | public function getBlockPrefix() |
|
37 | { |
|
38 | return 'dashboardconfiguration'; |
|
39 | } |
|
40 | } |
|
41 |
@@ 13-48 (lines=36) @@ | ||
10 | /** |
|
11 | * class to add content to a raw html pagepart |
|
12 | */ |
|
13 | class RawHTMLPagePartAdminType extends AbstractType |
|
14 | { |
|
15 | /** |
|
16 | * @param \Symfony\Component\Form\FormBuilderInterface $builder |
|
17 | * @param array $options |
|
18 | */ |
|
19 | public function buildForm(FormBuilderInterface $builder, array $options) |
|
20 | { |
|
21 | $builder->add('content', TextareaType::class, array( |
|
22 | 'label' => 'pagepart.html.content', |
|
23 | 'required' => false, |
|
24 | 'attr' => array( |
|
25 | 'style' => 'width: 600px', |
|
26 | 'rows' => 32, |
|
27 | ), |
|
28 | )); |
|
29 | } |
|
30 | ||
31 | /** |
|
32 | * @return string |
|
33 | */ |
|
34 | public function getBlockPrefix() |
|
35 | { |
|
36 | return 'kunstmaan_pagepartbundle_rawhtmlpageparttype'; |
|
37 | } |
|
38 | ||
39 | /** |
|
40 | * @param \Symfony\Component\OptionsResolver\OptionsResolver $resolver |
|
41 | */ |
|
42 | public function configureOptions(OptionsResolver $resolver) |
|
43 | { |
|
44 | $resolver->setDefaults(array( |
|
45 | 'data_class' => 'Kunstmaan\PagePartBundle\Entity\RawHTMLPagePart', |
|
46 | )); |
|
47 | } |
|
48 | } |
|
49 |