11
11
12
12
namespace Symfony \Cmf \Bundle \MenuBundle \Admin \Extension ;
13
13
14
+ use Burgov \Bundle \KeyValueFormBundle \Form \Type \KeyValueType ;
14
15
use Sonata \AdminBundle \Admin \AdminExtension ;
15
16
use Sonata \AdminBundle \Form \FormMapper ;
17
+ use Symfony \Component \Form \Extension \Core \Type \CheckboxType ;
18
+ use Symfony \Component \Form \Extension \Core \Type \TextType ;
16
19
17
20
/**
18
21
* Admin extension for editing menu options
@@ -52,13 +55,13 @@ public function configureFormFields(FormMapper $formMapper)
52
55
))
53
56
->add (
54
57
'display ' ,
55
- ' checkbox ' ,
58
+ CheckboxType::class ,
56
59
array ('required ' => false ),
57
60
array ('help ' => 'form.help_display ' )
58
61
)
59
62
->add (
60
63
'displayChildren ' ,
61
- ' checkbox ' ,
64
+ CheckboxType::class ,
62
65
array ('required ' => false ),
63
66
array ('help ' => 'form.help_display_children ' )
64
67
)
@@ -69,7 +72,7 @@ public function configureFormFields(FormMapper $formMapper)
69
72
}
70
73
71
74
$ child_options = array (
72
- 'value_type ' => ' text ' ,
75
+ 'value_type ' => TextType::class ,
73
76
'label ' => false ,
74
77
'attr ' => array ('style ' => 'clear:both ' ),
75
78
);
@@ -79,38 +82,38 @@ public function configureFormFields(FormMapper $formMapper)
79
82
))
80
83
->add (
81
84
'attributes ' ,
82
- ' burgov_key_value ' ,
85
+ KeyValueType::class ,
83
86
array (
84
- 'value_type ' => ' text ' ,
87
+ 'value_type ' => TextType::class ,
85
88
'required ' => false ,
86
- 'options ' => $ child_options ,
89
+ 'entry_options ' => $ child_options ,
87
90
)
88
91
)
89
92
->add (
90
93
'labelAttributes ' ,
91
- ' burgov_key_value ' ,
94
+ KeyValueType::class ,
92
95
array (
93
- 'value_type ' => ' text ' ,
96
+ 'value_type ' => TextType::class ,
94
97
'required ' => false ,
95
- 'options ' => $ child_options ,
98
+ 'entry_options ' => $ child_options ,
96
99
)
97
100
)
98
101
->add (
99
102
'childrenAttributes ' ,
100
- ' burgov_key_value ' ,
103
+ KeyValueType::class ,
101
104
array (
102
- 'value_type ' => ' text ' ,
105
+ 'value_type ' => TextType::class ,
103
106
'required ' => false ,
104
- 'options ' => $ child_options ,
107
+ 'entry_options ' => $ child_options ,
105
108
)
106
109
)
107
110
->add (
108
111
'linkAttributes ' ,
109
- ' burgov_key_value ' ,
112
+ KeyValueType::class ,
110
113
array (
111
- 'value_type ' => ' text ' ,
114
+ 'value_type ' => TextType::class ,
112
115
'required ' => false ,
113
- 'options ' => $ child_options ,
116
+ 'entry_options ' => $ child_options ,
114
117
)
115
118
)
116
119
->end ();
0 commit comments