@@ -119,39 +119,34 @@ These are the most important methods that a form type class can define:
119119
120120.. _form-type-methods-explanation :
121121
122- ``getParent() ``
123- When returning a (fully-qualified) class name here, Symfony will call each
124- method of that type (i.e. ``buildForm() ``, ``buildView() ``, etc.) and all its
125- type extensions, before calling the corresponding method of your custom type.
126- This is probably a good idea if you're just changing some details of an
127- existing type. To start from scratch, omit ``getParent() ``.
128-
129122``buildForm() ``
130123 It adds and configures other types into this type. It's the same method used
131124 when :ref: `creating Symfony form classes <creating-forms-in-classes >`.
132125
133126``buildView() ``
134127 It sets any extra variables you'll need when rendering the field in a template.
135128
136- ``configureOptions() ``
137- It defines the options configurable when using the form type, which are also
138- the options that can be used in ``buildForm() `` and ``buildView() ``
139- methods. Options are inherited from parent types and parent type
140- extensions, but you can create any custom option you need.
141-
142129``finishView() ``
143130 This method allows to modify the "view" of any rendered widget. This is useful
144131 if your form type consists of many fields, or contains a type that produces
145132 many HTML elements (e.g. ``ChoiceType ``). For any other use case, it's
146133 recommended to use ``buildView() `` instead.
147134
135+ ``configureOptions() ``
136+ It defines the options configurable when using the form type, which are also
137+ the options that can be used in ``buildForm() `` and ``buildView() ``
138+ methods. Options are inherited from parent types and parent type
139+ extensions, but you can create any custom option you need.
140+
148141``getParent() ``
149142 If your custom type is based on another type (i.e. they share some
150- functionality) add this method to return the fully-qualified class name
143+ functionality), add this method to return the fully-qualified class name
151144 of that original type. Do not use PHP inheritance for this.
152145 Symfony will call all the form type methods (``buildForm() ``,
153- ``buildView() ``, etc.) of the parent type and it will call all its type
154- extensions before calling the ones defined in your custom type.
146+ ``buildView() ``, etc.) and type extensions of the parent before
147+ calling the ones defined in your custom type.
148+
149+ Otherwise, if your custom type is build from scratch, you can omit ``getParent() ``.
155150
156151 By default, the ``AbstractType `` class returns the generic
157152 :class: `Symfony\\ Component\\ Form\\ Extension\\ Core\\ Type\\ FormType `
0 commit comments