File tree 1 file changed +5
-3
lines changed
1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ The ``entity`` type has just one required option: the entity which should
38
38
be listed inside the choice field::
39
39
40
40
$builder->add('users', 'entity', array(
41
- 'class' => 'Acme\\HelloBundle\\Entity\\ User',
41
+ 'class' => 'AcmeHelloBundle: User',
42
42
));
43
43
44
44
In this case, all ``User `` objects will be loaded from the database and rendered
@@ -56,7 +56,7 @@ option. The easiest way to use the option is as follows::
56
56
// ...
57
57
58
58
$builder->add('users', 'entity', array(
59
- 'class' => 'Acme\\HelloBundle\\Entity\\ User',
59
+ 'class' => 'AcmeHelloBundle: User',
60
60
'query_builder' => function(EntityRepository $er) {
61
61
return $er->createQueryBuilder('u')
62
62
->orderBy('u.username', 'ASC');
73
73
74
74
**type **: ``string `` **required **
75
75
76
- The class of your entity (e.g. ``Acme\StoreBundle\Entity\Category ``).
76
+ The class of your entity (e.g. ``AcmeStoreBundle:Category ``). This can be
77
+ a fully-qualified class name (e.g. ``Acme\StoreBundle\Entity\Category ``)
78
+ or the short alias name (as shown prior).
77
79
78
80
property
79
81
~~~~~~~~
You can’t perform that action at this time.
0 commit comments