Skip to content

Commit 53c113d

Browse files
committed
Rename a variable
1 parent 20478d3 commit 53c113d

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

form/dynamic_form_modification.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -298,13 +298,12 @@ Now that you have all the basics in place you can complete the listener logic::
298298
$formOptions = array(
299299
'class' => User::class,
300300
'choice_label' => 'fullName',
301-
'query_builder' => function (EntityRepository $users) use ($user) {
301+
'query_builder' => function (EntityRepository $userRepository) use ($user) {
302302
// build a custom query
303-
// return $users->createQueryBuilder('u')->addOrderBy('fullName', 'DESC');
303+
// return $userRepository->createQueryBuilder('u')->addOrderBy('fullName', 'DESC');
304304

305305
// or call a method on your repository that returns the query builder
306-
// the $users variable is an instance of your UserRepository
307-
// return $users->createOrderByFullNameQueryBuilder();
306+
// return $userRepository->createOrderByFullNameQueryBuilder();
308307
},
309308
);
310309

0 commit comments

Comments
 (0)