8000 Minor tweak · symfony/symfony-docs@ab51509 · GitHub
[go: up one dir, main page]

Skip to content

Commit ab51509

Browse files
committed
Minor tweak
1 parent 9e9ca5b commit ab51509

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

form/data_transformers.rst

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -485,17 +485,16 @@ To use the view transformer, call ``addViewTransformer()``.
485485
.. caution::
486486

487487
Be careful with model transformers and
488-
:doc:`Collection </reference/forms/types/collection>` field types: As the
489-
Collection's children are created early at `PRE_SET_DATA` by its
490-
`ResizeFormListener`, their data is populated later from the Norm Data. So
491-
your model transformer cannot reduce the number of items within the
488+
:doc:`Collection </reference/forms/types/collection>` field types.
489+
Collection's children are created early at ``PRE_SET_DATA`` by its
490+
``ResizeFormListener`` and their data is populated later from the normalized
491+
data. So your model transformer cannot reduce the number of items within the
492492
Collection (i.e. filtering out some items), as in that case the collection
493493
ends up with some empty children.
494494

495495
A possible workaround for that limitation could be not using the underlying
496496
object directly, but a DTO (Data Transfer Object) instead, that implements
497497
the transformation of such incompatible data structures.
498-
499498

500499
So why Use the Model Transformer?
501500
---------------------------------

0 commit comments

Comments
 (0)
0