Skip to content

Commit 291aa1c

Browse files
committed
fixup
1 parent 88c184e commit 291aa1c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

reference/forms/types/options/choice_attr.rst.inc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ If an array, the keys of the ``choices`` array must be used as keys::
3232

3333
use App\Entity\Category;
3434
use Symfony\Component\Form\ChoiceList\ChoiceList;
35-
use Symfony\Component\Form\ChoiceList\ChoiceList;
3635

3736
// ...
3837
$builder->add('choices', ChoiceType::class, [

reference/forms/types/options/choice_loader.rst.inc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@ choice_loader
33

44
**type**: :class:`Symfony\\Component\\Form\\ChoiceList\\Loader\\ChoiceLoaderInterface`
55

6-
The ``choice_loader`` can be used to only partially load the choices in cases where
7-
a fully-loaded list is not necessary. This is only needed in advanced cases and
8-
would replace the ``choices`` option.
6+
The ``choice_loader`` can be used instead of ``choices`` option. It allows to
7+
create a list lazily or partially when fetching only the choices for a set of
8+
submitted values (i.e. querying a search engine like ``ElasticSearch`` can be
9+
a heavy process).
910

1011
You can use an instance of :class:`Symfony\\Component\\Form\\ChoiceList\\Loader\\CallbackChoiceLoader`
1112
if you want to take advantage of lazy loading::

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy