@@ -62,7 +62,6 @@ A) The ``FormEvents::PRE_SET_DATA`` Event
6262The ``FormEvents::PRE_SET_DATA `` event is dispatched at the beginning of the
6363``Form::setData() `` method. It is used to modify the data given during
6464pre-population with
65- :method: `PreSetData::setData() <Symfony\\ Component\\ Form\\ Event\\ PreSetDataEvent> `.
6665The method :method: `Form::setData() <Symfony\\ Component\\ Form\\ Form::setData> `
6766is locked since the event is dispatched from it and will throw an exception
6867if called from a listener.
@@ -274,10 +273,10 @@ method of the ``FormFactory``::
274273
275274 // ...
276275
276+ use Symfony\Component\Form\Event\PreSubmitEvent;
277277 use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
278278 use Symfony\Component\Form\Extension\Core\Type\EmailType;
279279 use Symfony\Component\Form\Extension\Core\Type\TextType;
280- use Symfony\Component\Form\Event\PreSubmitEvent;
281280 use Symfony\Component\Form\FormEvents;
282281
283282 $form = $formFactory->createBuilder()
@@ -311,9 +310,9 @@ callback for better readability::
311310 // src/Form/SubscriptionType.php
312311 namespace App\Form;
313312
313+ use Symfony\Component\Form\Event\PreSetDataEvent;
314314 use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
315315 use Symfony\Component\Form\Extension\Core\Type\TextType;
316- use Symfony\Component\Form\Event\PreSetDataEvent;
317316 use Symfony\Component\Form\FormEvents;
318317
319318 // ...
@@ -352,9 +351,9 @@ Consider the following example of a form event subscriber::
352351 namespace App\Form\EventListener;
353352
354353 use Symfony\Component\EventDispatcher\EventSubscriberInterface;
355- use Symfony\Component\Form\Extension\Core\Type\EmailType;
356354 use Symfony\Component\Form\Event\PreSetDataEvent;
357355 use Symfony\Component\Form\Event\PreSubmitEvent;
356+ use Symfony\Component\Form\Extension\Core\Type\EmailType;
358357 use Symfony\Component\Form\FormEvents;
359358
360359 class AddEmailFieldListener implements EventSubscriberInterface
0 commit comments