File tree 2 files changed +18
-4
lines changed 2 files changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -1191,6 +1191,12 @@ is defined by the ``target`` parameter above (e.g. the ``homepage``).
1191
1191
Dynamically Encoding a Password
1192
1192
-------------------------------
1193
1193
1194
+ .. note ::
1195
+
1196
+ For historical reasons, Symfony uses the term *"password encoding" * when it
1197
+ should really refer to *"password hashing" *. The "encoders" are in fact
1198
+ `cryptographic hash functions `_.
1199
+
1194
1200
If, for example, you're storing users in the database, you'll need to encode
1195
1201
the users' passwords before inserting them. No matter what algorithm you
1196
1202
configure for your user object, the hashed password can always be determined
@@ -1396,5 +1402,6 @@ Learn More from the Cookbook
1396
1402
1397
1403
.. _`frameworkextrabundle documentation` : https://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/index.html
1398
1404
.. _`security advisories database` : https://github.com/FriendsOfPHP/security-advisories
1405
+ .. _`cryptographic hash functions` : https://en.wikipedia.org/wiki/Cryptographic_hash_function
1399
1406
.. _`HWIOAuthBundle` : https://github.com/hwi/HWIOAuthBundle
1400
1407
.. _`SensioDistributionBundle` : https://packagist.org/packages/sensio/distribution-bundle
Original file line number Diff line number Diff line change @@ -192,14 +192,21 @@ instead of the ``default`` entity manager.
192
192
query_builder
193
193
~~~~~~~~~~~~~
194
194
195
- **type **: ``Doctrine\ORM\QueryBuilder `` or a Closure
195
+ **type **: ``Doctrine\ORM\QueryBuilder `` or a Closure ** default **: `` null ``
196
196
197
197
Allows you to create a custom query for your choices. See
198
198
:ref: `ref-form-entity-query-builder ` for an example.
199
199
200
- The value of this option can either be a ``QueryBuilder `` object or a Closure.
201
- When using a Closure, you will be passed the ``EntityRepository `` of the entity
202
- as the only argument and should return a ``QueryBuilder ``.
200
+ The value of this option can either be a ``QueryBuilder `` object, a Closure or
201
+ ``null `` (which will load all entities). When using a Closure, you will be
202
+ passed the ``EntityRepository `` of the entity as the only argument and should
203
+ return a ``QueryBuilder ``.
204
+
205
+ If you'd like to display an empty list of entries, you can return ``null `` in
206
+ the Closure.
207
+
208
+ .. versionadded :: 2.8
209
+ Returning ``null `` in the Closure was introduced in Symfony 2.8.
203
210
204
211
Overridden Options
205
212
------------------
You can’t perform that action at this time.
0 commit comments