Skip to content

Commit

Permalink
Update Form event diagrams to consistent styling
Browse files Browse the repository at this point in the history
  • Loading branch information
wouterj committed Jan 3, 2021
1 parent 922a469 commit 0641181
Show file tree
Hide file tree
Showing 8 changed files with 210 additions and 8 deletions.
Binary file removed _images/components/form/general_flow.png
Binary file not shown.
Binary file removed _images/components/form/set_data_flow.png
Binary file not shown.
Binary file removed _images/components/form/submission_flow.png
Binary file not shown.
56 changes: 56 additions & 0 deletions _images/form/form_prepopulation_workflow.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
78 changes: 78 additions & 0 deletions _images/form/form_submission_workflow.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
68 changes: 68 additions & 0 deletions _images/form/form_workflow.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/sources/form/form_events.dia
Binary file not shown.
16 changes: 8 additions & 8 deletions form/events.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,16 @@ register an event listener to the ``FormEvents::PRE_SUBMIT`` event as follows::
The Form Workflow
-----------------

The Form Submission Workflow
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. raw:: html

.. image:: /_images/components/form/general_flow.png
:align: center
<object data="../_images/form/form_workflow.svg" type="image/svg+xml"></object>

1) Pre-populating the Form (``FormEvents::PRE_SET_DATA`` and ``FormEvents::POST_SET_DATA``)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. image:: /_images/components/form/set_data_flow.png
:align: center
.. raw:: html

<object data="../_images/form/form_prepopulation_workflow.svg" type="image/svg+xml"></object>

Two events are dispatched during pre-population of a form, when
:method:`Form::setData() <Symfony\\Component\\Form\\Form::setData>`
Expand Down Expand Up @@ -118,8 +117,9 @@ View data Normalized data transformed using a view transformer
2) Submitting a Form (``FormEvents::PRE_SUBMIT``, ``FormEvents::SUBMIT`` and ``FormEvents::POST_SUBMIT``)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. image:: /_images/components/form/submission_flow.png
:align: center
.. raw:: html

<object data="../_images/form/form_submission_workflow.svg" type="image/svg+xml"></object>

Three events are dispatched when
:method:`Form::handleRequest() <Symfony\\Component\\Form\\Form::handleRequest>`
Expand Down

0 comments on commit 0641181

Please sign in to comment.