From 0670f25666aa85b7ad9677abf0aa8dc866d2314c Mon Sep 17 00:00:00 2001 From: Ahmed Siouani Date: Wed, 28 May 2014 17:28:48 +0200 Subject: [PATCH 1/2] [2.3] Examples that points to the DataCollectorListener should be removed. --- components/form/form_events.rst | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/components/form/form_events.rst b/components/form/form_events.rst index 1b81360f529..2b04df2c3f5 100644 --- a/components/form/form_events.rst +++ b/components/form/form_events.rst @@ -108,13 +108,6 @@ the form. | View data | Normalized data transformed using a view transformer | +-----------------+------------------------------------------------------+ -.. sidebar:: ``FormEvents::POST_SET_DATA`` in the Form component - - The :class:`Symfony\\Component\\Form\\Extension\\DataCollector\\EventListener\\DataCollectorListener` - class is subscribed to listen to the ``FormEvents::POST_SET_DATA`` event - in order to collect information about the forms from the denormalized - model and view data. - 2) Submitting a Form (``FormEvents::PRE_SUBMIT``, ``FormEvents::SUBMIT`` and ``FormEvents::POST_SUBMIT``) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -218,9 +211,6 @@ It can be used to fetch data after denormalization. .. sidebar:: ``FormEvents::POST_SUBMIT`` in the Form component - The :class:`Symfony\\Component\\Form\\Extension\\DataCollector\\EventListener\\DataCollectorListener` - subscribes to the ``FormEvents::POST_SUBMIT`` event in order to collect - information about the forms. The :class:`Symfony\\Component\\Form\\Extension\\Validator\\EventListener\\ValidationListener` subscribes to the ``FormEvents::POST_SUBMIT`` event in order to automatically validate the denormalized object, and update the normalized From 01057ae6541e449cb149f1bf60b3d7fee87b81af Mon Sep 17 00:00:00 2001 From: WouterJ Date: Tue, 16 Sep 2014 15:32:23 +0200 Subject: [PATCH 2/2] Reverted removal, removed API links instead --- components/form/form_events.rst | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/components/form/form_events.rst b/components/form/form_events.rst index 2b04df2c3f5..fe67979f7db 100644 --- a/components/form/form_events.rst +++ b/components/form/form_events.rst @@ -83,7 +83,7 @@ The ``FormEvents::PRE_SET_DATA`` event is dispatched at the beginning of the .. sidebar:: ``FormEvents::PRE_SET_DATA`` in the Form component The ``collection`` form type relies on the - :class:`Symfony\\Component\\Form\\Extension\\Core\\EventListener\\ResizeFormListener` + ``Symfony\Component\Form\Extension\Core\EventListener\ResizeFormListener`` subscriber, listening to the ``FormEvents::PRE_SET_DATA`` event in order to reorder the form's fields depending on the data from the pre-populated object, by removing and adding all form rows. @@ -108,6 +108,13 @@ the form. | View data | Normalized data transformed using a view transformer | +-----------------+------------------------------------------------------+ +.. sidebar:: ``FormEvents::POST_SET_DATA`` in the Form component + + The ``Symfony\Component\Form\Extension\DataCollector\EventListener\DataCollectorListener`` + class is subscribed to listen to the ``FormEvents::POST_SET_DATA`` event + in order to collect information about the forms from the denormalized + model and view data. + 2) Submitting a Form (``FormEvents::PRE_SUBMIT``, ``FormEvents::SUBMIT`` and ``FormEvents::POST_SUBMIT``) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -145,10 +152,10 @@ It can be used to: .. sidebar:: ``FormEvents::PRE_SUBMIT`` in the Form component - The :class:`Symfony\\Component\\Form\\Extension\\Core\\EventListener\\TrimListener` + The ``Symfony\Component\Form\Extension\Core\EventListener\TrimListener`` subscriber subscribes to the ``FormEvents::PRE_SUBMIT`` event in order to trim the request's data (for string values). - The :class:`Symfony\\Component\\Form\\Extension\\Csrf\\EventListener\\CsrfValidationListener` + The ``Symfony\Component\Form\Extension\Csrf\EventListener\CsrfValidationListener`` subscriber subscribes to the ``FormEvents::PRE_SUBMIT`` event in order to validate the CSRF token. @@ -179,7 +186,7 @@ It can be used to change data from the normalized representation of the data. .. sidebar:: ``FormEvents::SUBMIT`` in the Form component - The :class:`Symfony\\Component\\Form\\Extension\\Core\\EventListener\\ResizeFormListener` + The ``Symfony\Component\Form\Extension\Core\EventListener\ResizeFormListener`` subscribes to the ``FormEvents::SUBMIT`` event in order to remove the fields that need to be removed whenever manipulating a collection of forms for which ``allow_delete`` has been enabled. @@ -211,7 +218,10 @@ It can be used to fetch data after denormalization. .. sidebar:: ``FormEvents::POST_SUBMIT`` in the Form component - The :class:`Symfony\\Component\\Form\\Extension\\Validator\\EventListener\\ValidationListener` + The ``Symfony\Component\Form\Extension\DataCollector\EventListener\DataCollectorListener`` + subscribes to the ``FormEvents::POST_SUBMIT`` event in order to collect + information about the forms. + The ``Symfony\Component\Form\Extension\Validator\EventListener\ValidationListener`` subscribes to the ``FormEvents::POST_SUBMIT`` event in order to automatically validate the denormalized object, and update the normalized as well as the view's representations.