Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 4818d50

Browse filesBrowse files
xavierbriandfabpot
authored andcommitted
[Forms/overview] added namespace details
1 parent 38e73e0 commit 4818d50
Copy full SHA for 4818d50

File tree

Expand file treeCollapse file tree

1 file changed

+8
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+8
-0
lines changed

‎guides/forms/overview.rst

Copy file name to clipboard
100644100755
Expand all lines: guides/forms/overview.rst
+8Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ the object.
1818
Let's see how this works in a practical example. Let's create a simple
1919
``Customer`` class::
2020

21+
namespace Application\HelloBundle\Entity;
22+
2123
class Customer
2224
{
2325
public $name;
@@ -40,6 +42,12 @@ is public, while ``$age`` can only be modified through setters and getters.
4042
Now let's create a form to let the visitor fill the data of the object::
4143

4244
// src/Application/HelloBundle/Controller/HelloController.php
45+
46+
use Application\HelloBundle\Entity\Customer;
47+
use Symfony\Component\Form\Form;
48+
use Symfony\Component\Form\TextField;
49+
use Symfony\Component\Form\IntegerField;
50+
4351
public function signupAction()
4452
{
4553
$customer = new Customer();

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.