Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 731617f

Browse files
committed
Clearify behaviour of CallbackChoiceLoader
1 parent e5e9a5d commit 731617f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

reference/forms/types/choice.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,14 @@ if you want to take advantage of lazy loading::
197197
},
198198
));
199199

200+
This will cause the call of ``StaticClass::getConstants()`` to not happen if the request is redirected
201+
and if there is no pre set or submitted data. Otherwise the choice options would need to be resolved thus
202+
triggering the callback.
203+
204+
.. versionadded:: 3.2
205+
The ability to use an instance of :class:`Symfony\\Component\\Form\\ChoiceList\\Loader\\CallbackChoiceLoader`
206+
has been introduced in Symfony 3.2
207+
200208
.. include:: /reference/forms/types/options/choice_name.rst.inc
201209

202210
.. include:: /reference/forms/types/options/choice_translation_domain.rst.inc

0 commit comments

Comments
 (0)