Skip to content

Commit

Permalink
minor #6596 Fixed query_builder option (HeahDude)
Browse files Browse the repository at this point in the history
This PR was merged into the 2.3 branch.

Discussion
----------

Fixed query_builder option

doc fix: 2.3+

ref #6594 (comment)

Commits
-------

45f586b Fixed query_builder option
  • Loading branch information
wouterj committed May 21, 2016
2 parents 1a3694d + 45f586b commit 61b362b
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 61b362b

Please sign in to comment.