File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -135,19 +135,19 @@ Grouping Options
135
135
136
136
You can easily "group" options in a select by passing a multi-dimensional choices array::
137
137
138
- $builder->add('stockStatus', 'choice', [
139
- 'choices' => [
140
- 'Main Statuses' => [
138
+ $builder->add('stockStatus', 'choice', array(
139
+ 'choices' => array(
140
+ 'Main Statuses' => array(
141
141
'Yes' => 'stock_yes',
142
142
'No' => 'stock_no',
143
- ] ,
144
- 'Out of Stock Statuses' => [
143
+ ) ,
144
+ 'Out of Stock Statuses' => array(
145
145
'Backordered' => 'stock_backordered',
146
146
'Discontinued' => 'stock_discontinued',
147
- ]
148
- ] ,
147
+ ),
148
+ ) ,
149
149
'choices_as_values' => true,
150
- );
150
+ )) ;
151
151
152
152
.. image :: /_images/reference/form/choice-example4.png
153
153
:align: center
You can’t perform that action at this time.
0 commit comments