File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -19,13 +19,11 @@ The Difference between Data Transformers and Mappers
1919It is important to know the difference between
2020:doc: `data transformers </form/data_transformers >` and mappers.
2121
22- * **Data transformers ** change the representation of a value (e.g. from
23- ``"2016-08-12" `` to a ``DateTime `` instance);
24- * **Data mappers ** map data (e.g. an object or array) to form fields, and vice versa.
25-
26- Changing a ``YYYY-mm-dd `` string value to a ``DateTime `` instance is done by a
27- data transformer. Populating inner fields (e.g year, hour, etc) of a compound date type using
28- a ``DateTime `` instance is done by the data mapper.
22+ * **Data transformers ** change the representation of a single value, e.g. from
23+ ``"2016-08-12" `` to a ``DateTime `` instance;
24+ * **Data mappers ** map data (e.g. an object or array) to one or many form fields, and vice versa,
25+ e.g. using a single ``DateTime `` instance to populate the inner fields (e.g year, hour, etc.)
26+ of a compound date type.
2927
3028Creating a Data Mapper
3129----------------------
You can’t perform that action at this time.
0 commit comments