Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3e22051

Browse files
committed
Merge pull requestsymfony#3306 from xabbuh/issue-3272
add note on return values when null is passed to a data transformer's tr...
2 parents899b48a +8189574 commit3e22051

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

‎cookbook/form/data_transformers.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,12 @@ for converting to and from the issue number and the ``Issue`` object::
9797
If you want a new issue to be created when an unknown number is entered, you
9898
can instantiate it rather than throwing the ``TransformationFailedException``.
9999

100+
..note::
101+
102+
When ``null`` is passed to the ``transform()`` method, your transformer
103+
should return an equivalent value of the type it is transforming to (e.g.
104+
an empty string, 0 for integers or 0.0 for floats).
105+
100106
Using the Transformer
101107
---------------------
102108

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp