Skip to content

Commit 3d2e33d

Browse files
committed
Fixed issues and rewords
1 parent 7bbd69e commit 3d2e33d

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

form/create_custom_field_type.rst

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -122,16 +122,12 @@ convenient to extend instead from :class:`Symfony\\Component\\Form\\AbstractType
122122
class PostalAddressType extends AbstractType
123123
{
124124
// ...
125-
126-
public function getParent()
127-
{
128-
return FormType::class;
129-
}
130125
}
131126

132-
When a form type doesn't extend from another specific type, make it extend from
133-
the generic :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\FormType`,
134-
which is the parent of all the other types.
127+
When a form type doesn't extend from another specific type, there's no need to
128+
implement the ``getParent()`` method (Symfony will make the type extend from the
129+
generic :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\FormType`,
130+
which is the parent of all the other types).
135131

136132
These are the most important methods that a form type class can define:
137133

0 commit comments

Comments
 (0)