Skip to content

Commit 8e2db8f

Browse files
committed
[cookbook][doctrine] A few more tweaks for #1599
1 parent 0a23fb7 commit 8e2db8f

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

cookbook/doctrine/registration_form.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ The simple User model
1515

1616
You have a simple ``User`` entity mapped to the database::
1717

18-
// src/Acme/AccountBundle/Document/User.php
19-
namespace Acme\AccountBundle\Document;
18+
// src/Acme/AccountBundle/Entity/User.php
19+
namespace Acme\AccountBundle\Entity;
2020

2121
use Doctrine\ORM\Mapping as ORM;
2222
use Symfony\Component\Validator\Constraints as Assert;
@@ -74,7 +74,7 @@ You have a simple ``User`` entity mapped to the database::
7474
}
7575
}
7676

77-
This ``User`` document contains three fields and two of them (email and
77+
This ``User`` entity contains three fields and two of them (email and
7878
password) should display on the form. The email property must be unique
7979
in the database, this is enforced by adding this validation at the top of
8080
the class.
@@ -111,7 +111,7 @@ Next, create the form for the ``User`` model::
111111

112112
public function getDefaultOptions(array $options)
113113
{
114-
return array('data_class' => 'Acme\AccountBundle\Document\User');
114+
return array('data_class' => 'Acme\AccountBundle\Entity\User');
115115
}
116116

117117
public function getName()
@@ -122,7 +122,7 @@ Next, create the form for the ``User`` model::
122122

123123
There are just two fields: email and password (repeated to confirm the entered
124124
password). The ``data_class`` option tells the form the name of data class
125-
(i.e. your ``User`` document).
125+
(i.e. your ``User`` entity).
126126

127127
.. tip::
128128

@@ -143,12 +143,12 @@ Start by creating a simple class which represents the "registration"::
143143

144144
use Symfony\Component\Validator\Constraints as Assert;
145145

146-
use Acme\AccountBundle\Document\User;
146+
use Acme\AccountBundle\Entity\User;
147147

148148
class Registration
149149
{
150150
/**
151-
* @Assert\Type(type="Acme\AccountBundle\Document\User")
151+
* @Assert\Type(type="Acme\AccountBundle\Entity\User")
152152
*/
153153
protected $user;
154154

0 commit comments

Comments
 (0)