Skip to content

The instructions are incomplete. #2675

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 30, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 26 additions & 1 deletion cookbook/doctrine/registration_form.rst
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ and its template:
<input type="submit" />
</form>

Finally, create the controller which handles the form submission. This performs
Next, create the controller which handles the form submission. This performs
the validation and saves the data into the database::

public function createAction()
Expand All @@ -281,6 +281,31 @@ the validation and saves the data into the database::
);
}

Add New Routes
--------------

Next, update your routes

.. code-block:: yml

register:
pattern: /register
defaults: { _controller: AcmeAccountBundle:Account:register }

create:
pattern: /create
defaults: { _controller: AcmeAccountBundle:Account:create }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

route definitions should also be added in XML and PHP format


Run Doctrine Commands
---------------------

Finally, generate your entities and schema

.. code-block::

php app/console doctrine:database:create
php app/console doctrine:schema:update --force

That's it! Your form now validates, and allows you to save the ``User``
object to the database. The extra ``terms`` checkbox on the ``Registration``
model class is used during validation, but not actually used afterwards when
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy