Skip to content

Commit 8e9d04f

Browse files
committed
Remove references to deprecated DataEvent and FilterDataEvent
1 parent 6867e4e commit 8e9d04f

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

cookbook/form/dynamic_form_generation.rst

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -145,20 +145,16 @@ The ``FormEvents::PRE_SET_DATA`` line actually resolves to the string ``form.pre
145145
The `FormEvents class`_ serves an organizational purpose. It is a centralized location
146146
in which you can find all of the various form events available.
147147

148-
While this example could have used the ``form.set_data`` event or even the ``form.post_set_data``
149-
events just as effectively, by using ``form.pre_set_data`` you guarantee that
148+
While this example could have used the ``form.post_set_data``
149+
event just as effectively, by using ``form.pre_set_data`` you guarantee that
150150
the data being retrieved from the ``Event`` object has in no way been modified
151-
by any other subscribers or listeners. This is because ``form.pre_set_data``
152-
passes a `DataEvent`_ object instead of the `FilterDataEvent`_ object passed
153-
by the ``form.set_data`` event. `DataEvent`_, unlike its child `FilterDataEvent`_,
154-
lacks a setData() method.
151+
by any other subscribers or listeners because ``form.pre_set_data`` is the
152+
first form event dispatched.
155153

156154
.. note::
157155

158156
You may view the full list of form events via the `FormEvents class`_,
159157
found in the form bundle.
160158

161-
.. _`DataEvent`: https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Form/Event/DataEvent.php
162159
.. _`FormEvents class`: https://github.com/symfony/Form/blob/master/FormEvents.php
163160
.. _`Form class`: https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Form/Form.php
164-
.. _`FilterDataEvent`: https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Form/Event/FilterDataEvent.php

0 commit comments

Comments
 (0)