-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Add documentation for CallbackChoiceLoader #7219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution :) I've just left some minor comments
@@ -184,6 +184,19 @@ The ``choice_loader`` can be used to only partially load the choices in cases wh | |||
a fully-loaded list is not necessary. This is only needed in advanced cases and | |||
would replace the ``choices`` option. | |||
|
|||
You can use an instance of :class:`Symfony\\Component\\Form\\ChoiceList\\Loader\\CallbackChoiceLoader` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing a versionadded
note
return StaticClass::getConstants(); | ||
}, | ||
)); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could precise that, the call won't happen if there is a redirection (i.e the view is not built), AND if there is no pre set data or submitted data. Because otherwise we'll need to transform the value to a model choice (or the opposite) and that implies loading choices too.
Thank you again @sawmurai :) 👍 Status: Reviewed |
👍 |
Thank you @sawmurai. |
…aviereguiluz) This PR was merged into the 3.2 branch. Discussion ---------- Add documentation for CallbackChoiceLoader PR for #7181 Commits ------- 5838635 Make lines shorter to comply with 80-char limit 731617f Clearify behaviour of CallbackChoiceLoader e5e9a5d Add documentation for CallbackChoiceLoader
* 3.2: (24 commits) Minor rewords Update session_configuration.rst [#7522] minor wording improvement [#7513] fix line length Update 'ide' example in framework.rst [#7219] move versionadded in front of description Improved the image for Doctrine + Web Debug Toolbar [Serializer] Docs for the PropertyInfo integration Finished this PR section chronology in comment Removed the example about Redis Update cache.rst Update bundles/configuration.rst Fix typos Removed tip that was meant for the 2.x versions fix usage of the session flag bag API Add caution related to deprecate mail transport Use https URLs when possible [Requirements] Clarify what are JSON and ctype Proposed a minor reword ...
PR for #7181