@@ -35,7 +35,7 @@ Your ``User`` entity will probably at least have the following fields:
35
35
``plainPassword ``
36
36
This field is *not * persisted: (notice no ``@ORM\Column `` above it). It
37
37
temporarily stores the plain password from the registration form. This field
38
- can be validated then used to populate the ``password `` field.
38
+ can be validated and is then used to populate the ``password `` field.
39
39
40
40
With some validation added, your class may look something like this::
41
41
@@ -127,17 +127,18 @@ With some validation added, your class may look something like this::
127
127
128
128
public function getSalt()
129
129
{
130
- // The bcrypt algorithm don 't require a separate salt.
130
+ // The bcrypt algorithm doesn 't require a separate salt.
131
131
// You *may* need a real salt if you choose a different encoder.
132
132
return null;
133
133
}
134
134
135
135
// other methods, including security methods like getRoles()
136
136
}
137
137
138
- The ``UserInterface `` requires a few other methods and your ``security.yml `` file
139
- needs to be configured properly to work with the ``User `` entity. For a more full
140
- example, see the :ref: `Entity Provider <security-crete-user-entity >` article.
138
+ The :class: `Symfony\\ Component\\ Security\\ Core\\ User\\ UserInterface ` requires
139
+ a few other methods and your ``security.yml `` file needs to be configured
140
+ properly to work with the ``User `` entity. For a more complete example, see
141
+ the :ref: `Entity Provider <security-crete-user-entity >` article.
141
142
142
143
.. _cookbook-registration-password-max :
143
144
@@ -186,7 +187,7 @@ Next, create the form for the ``User`` entity::
186
187
public function setDefaultOptions(OptionsResolverInterface $resolver)
187
188
{
188
189
$resolver->setDefaults(array(
189
- 'data_class' => 'AppBundle\Entity\User'
190
+ 'data_class' => 'AppBundle\Entity\User',
190
191
));
191
192
}
192
193
@@ -201,7 +202,8 @@ There are just three fields: ``email``, ``username`` and ``plainPassword``
201
202
202
203
.. tip ::
203
204
204
- To explore more things about the Form component, read :doc: `/book/forms `.
205
+ To explore more things about the Form component, read the
206
+ :doc: `chapter about forms </book/forms >` in the book.
205
207
206
208
Handling the Form Submission
207
209
----------------------------
@@ -213,10 +215,9 @@ into the database::
213
215
// src/AppBundle/Controller/RegistrationController.php
214
216
namespace AppBundle\Controller;
215
217
216
- use Symfony\Bundle\FrameworkBundle\Controller\Controller;
217
-
218
218
use AppBundle\Form\UserType;
219
219
use AppBundle\Entity\User;
220
+ use Symfony\Bundle\FrameworkBundle\Controller\Controller;
220
221
use Symfony\Component\HttpFoundation\Request;
221
222
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
222
223
@@ -376,8 +377,8 @@ See :doc:`/cookbook/form/form_customization` for more details.
376
377
Update your Database Schema
377
378
---------------------------
378
379
379
- If you've updated the User entity during this tutorial, you have to update your
380
- database schema using this command:
380
+ If you've updated the `` User `` entity during this tutorial, you have to update
381
+ your database schema using this command:
381
382
382
383
.. code-block :: bash
383
384
0 commit comments