Skip to content

Commit f64fe19

Browse files
committed
[#6594] Add versionadded directive and capitialize Closure
1 parent 3f9cf0b commit f64fe19

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

reference/forms/types/entity.rst

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -202,10 +202,14 @@ query_builder
202202
Allows you to create a custom query for your choices. See
203203
:ref:`ref-form-entity-query-builder` for an example.
204204

205-
The value of this option can either be a ``QueryBuilder`` object, a Closure or ``null``.
206-
When using a Closure, you will be passed the ``EntityRepository`` of the entity
207-
as the only argument and should return a ``QueryBuilder``.
208-
If you'd like to display a list of empty entries, you can return ``null`` in the closure.
205+
The value of this option can either be a ``QueryBuilder`` object, a Closure or
206+
``null``. When using a Closure, you will be passed the ``EntityRepository`` of
207+
the entity as the only argument and should return a ``QueryBuilder``. If you'd
208+
like to display an empty list of entries, you can return ``null`` in the
209+
Closure.
210+
211+
.. versionadded:: 3.1
212+
Returning ``null`` in the Closure was introduced in Symfony 3.1.
209213

210214
Overridden Options
211215
------------------

0 commit comments

Comments
 (0)