Skip to content

Commit 45f586b

Browse files
committed
Fixed query_builder option
1 parent c8f4583 commit 45f586b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

reference/forms/types/entity.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,12 +166,13 @@ cast into a string and so must have a ``__toString()`` method.
166166
query_builder
167167
~~~~~~~~~~~~~
168168

169-
**type**: ``Doctrine\ORM\QueryBuilder`` or a Closure
169+
**type**: ``Doctrine\ORM\QueryBuilder`` or a Closure **default**: ``null``
170170

171171
Allows you to create a custom query for your choices. See
172172
:ref:`ref-form-entity-query-builder` for an example.
173173

174-
The value of this option can either be a ``QueryBuilder`` object or a Closure.
174+
The value of this option can either be a ``QueryBuilder`` object, a Closure or
175+
``null`` by default which loads all entities.
175176
When using a Closure, you will be passed the ``EntityRepository`` of the entity
176177
as the only argument and should return a ``QueryBuilder``.
177178

0 commit comments

Comments
 (0)