@@ -116,25 +116,6 @@ These are the most important methods that a form type class can define:
116116
117117.. _form-type-methods-explanation :
118118
119- ``buildForm() ``
120- It adds and configures other types into this type. It's the same method used
121- when :ref: `creating Symfony form classes <creating-forms-in-classes >`.
122-
123- ``buildView() ``
124- It sets any extra variables you'll need when rendering the field in a template.
125-
126- ``finishView() ``
127- This method allows to modify the "view" of any rendered widget. This is useful
128- if your form type consists of many fields, or contains a type that produces
129- many HTML elements (e.g. ``ChoiceType ``). For any other use case, it's
130- recommended to use ``buildView() `` instead.
131-
132- ``configureOptions() ``
133- It defines the options configurable when using the form type, which are also
134- the options that can be used in ``buildForm() `` and ``buildView() ``
135- methods. Options are inherited from parent types and parent type
136- extensions, but you can create any custom option you need.
137-
138119``getParent() ``
139120 If your custom type is based on another type (i.e. they share some
140121 functionality), add this method to return the fully-qualified class name
@@ -149,6 +130,28 @@ These are the most important methods that a form type class can define:
149130 :class: `Symfony\\ Component\\ Form\\ Extension\\ Core\\ Type\\ FormType `
150131 type, which is the root parent for all form types in the Form component.
151132
133+ ``configureOptions() ``
134+ It defines the options configurable when using the form type, which are also
135+ the options that can be used in the following methods. Options are inherited
136+ from parent types and parent type extensions, but you can create any custom
137+ option you need.
138+
139+ ``buildForm() ``
140+ It configures the current form and may add nested fields. It's the same
141+ method used when
142+ :ref: `creating Symfony form classes <creating-forms-in-classes >`.
143+
144+ ``buildView() ``
145+ It sets any extra variables you'll need when rendering the field in a form
146+ theme template.
147+
148+ ``finishView() ``
149+ Same as ``buildView() ``. This is useful only if your form type consists of
150+ many fields (i.e. A ``ChoiceType `` composed of many radio or checkboxes),
151+ as this method will allow accessing child views with
152+ ``$view['child_name'] ``. For any other use case, it's recommended to use
153+ ``buildView() `` instead.
154+
152155Defining the Form Type
153156~~~~~~~~~~~~~~~~~~~~~~
154157
0 commit comments