Skip to content

Commit 93177d7

Browse files
committed
minor #8527 Changing type definition of query_builder option: Closure by callable (yceruto, javiereguiluz)
This PR was merged into the 2.7 branch. Discussion ---------- Changing type definition of query_builder option: Closure by callable According to its own definition: https://github.com/symfony/symfony/blob/2.7/src/Symfony/Bridge/Doctrine/Form/Type/EntityType.php#L43 Commits ------- fb64173 Minor syntax issue ab58080 Changing type definition Closure by callable
2 parents c347444 + fb64173 commit 93177d7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

reference/forms/types/entity.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,13 +181,13 @@ instead of the ``default`` entity manager.
181181
query_builder
182182
~~~~~~~~~~~~~
183183

184-
**type**: ``Doctrine\ORM\QueryBuilder`` or a Closure **default**: ``null``
184+
**type**: ``Doctrine\ORM\QueryBuilder`` or a ``callable`` **default**: ``null``
185185

186186
Allows you to create a custom query for your choices. See
187187
:ref:`ref-form-entity-query-builder` for an example.
188188

189-
The value of this option can either be a ``QueryBuilder`` object, a Closure or
190-
``null`` (which will load all entities). When using a Closure, you will be
189+
The value of this option can either be a ``QueryBuilder`` object, a callable or
190+
``null`` (which will load all entities). When using a callable, you will be
191191
passed the ``EntityRepository`` of the entity as the only argument and should
192192
return a ``QueryBuilder``.
193193

0 commit comments

Comments
 (0)