Skip to content

Commit

Permalink
Fixed query_builder option
Browse files Browse the repository at this point in the history
  • Loading branch information
HeahDude committed May 21, 2016
1 parent c8f4583 commit 45f586b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions reference/forms/types/entity.rst
Original file line number Diff line number Diff line change
Expand Up @@ -166,12 +166,13 @@ cast into a string and so must have a ``__toString()`` method.
query_builder
~~~~~~~~~~~~~

**type**: ``Doctrine\ORM\QueryBuilder`` or a Closure
**type**: ``Doctrine\ORM\QueryBuilder`` or a Closure **default**: ``null``

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

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

Expand Down

0 comments on commit 45f586b

Please sign in to comment.