File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -1550,7 +1550,7 @@ but here's a short example::
1550
1550
;
1551
1551
1552
1552
Now, when you call `$form->bindRequest($request) `, the constraints setup here are run
1553
- against your form's data. If you're using a form class, override the ``getDefaultOptions ``
1553
+ against your form's data. If you're using a form class, override the ``setDefaultOptions() ``
1554
1554
method to specify the option::
1555
1555
1556
1556
namespace Acme\TaskBundle\Form\Type;
Original file line number Diff line number Diff line change @@ -70,17 +70,17 @@ important:
70
70
set) the ``multiple `` attribute on the ``select `` field. See `Creating a Template for the Field `_
71
71
for more details.
72
72
73
- * ``getDefaultOptions () `` - This defines options for your form type that
73
+ * ``setDefaultOptions () `` - This defines options for your form type that
74
74
can be used in ``buildForm() `` and ``buildView() ``. There are a lot of
75
- options common to all fields (see `FieldType `_), but you can create any
75
+ options common to all fields (see `FormType `_), but you can create any
76
76
others that you need here.
77
77
78
78
.. tip ::
79
79
80
80
If you're creating a field that consists of many fields, then be sure
81
81
to set your "parent" type as ``form `` or something that extends ``form ``.
82
82
Also, if you need to modify the "view" of any of your child types from
83
- your parent type, use the ``buildViewBottomUp () `` method.
83
+ your parent type, use the ``finishView () `` method.
84
84
85
85
The ``getName() `` method returns an identifier which should be unique in
86
86
your application. This is used in various places, such as when customizing
Original file line number Diff line number Diff line change @@ -113,7 +113,7 @@ But we absolutely want to have a dedicated form type to deal with location (reme
113
113
114
114
The ``virtual `` form field option is the solution.
115
115
116
- We can set the option ``'virtual' => true `` in the ``getDefaultOptions `` method
116
+ We can set the option ``'virtual' => true `` in the ``setDefaultOptions() `` method
117
117
of ``LocationType `` and directly start using it in the two original form types.
118
118
119
119
Look at the result::
You can’t perform that action at this time.
0 commit comments