@@ -84,8 +84,8 @@ objects::
84
84
85
85
Then, create a form class so that a ``Tag `` object can be modified by the user::
86
86
87
- // src/AppBundle/Form/Type/ TagType.php
88
- namespace AppBundle\Form\Type ;
87
+ // src/AppBundle/Form/TagType.php
88
+ namespace AppBundle\Form;
89
89
90
90
use AppBundle\Entity\Tag;
91
91
use Symfony\Component\Form\AbstractType;
@@ -114,8 +114,8 @@ form itself, create a form for the ``Task`` class.
114
114
Notice that you embed a collection of ``TagType `` forms using the
115
115
:doc: `CollectionType </reference/forms/types/collection >` field::
116
116
117
- // src/AppBundle/Form/Type/ TaskType.php
118
- namespace AppBundle\Form\Type ;
117
+ // src/AppBundle/Form/TaskType.php
118
+ namespace AppBundle\Form;
119
119
120
120
use AppBundle\Entity\Task;
121
121
use Symfony\Component\Form\AbstractType;
@@ -150,7 +150,7 @@ In your controller, you'll create a new form from the ``TaskType``::
150
150
151
151
use AppBundle\Entity\Tag;
152
152
use AppBundle\Entity\Task;
153
- use AppBundle\Form\Type\ TaskType;
153
+ use AppBundle\Form\TaskType;
154
154
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
155
155
use Symfony\Component\HttpFoundation\Request;
156
156
@@ -254,7 +254,7 @@ type expects to receive exactly two, otherwise an error will be thrown:
254
254
``This form should not contain extra fields ``. To make this flexible,
255
255
add the ``allow_add `` option to your collection field::
256
256
257
- // src/AppBundle/Form/Type/ TaskType.php
257
+ // src/AppBundle/Form/TaskType.php
258
258
259
259
// ...
260
260
use Symfony\Component\Form\FormBuilderInterface;
@@ -419,7 +419,7 @@ for the tags in the ``Task`` class::
419
419
420
420
Next, add a ``by_reference `` option to the ``tags `` field and set it to ``false ``::
421
421
422
- // src/AppBundle/Form/Type/ TaskType.php
422
+ // src/AppBundle/Form/TaskType.php
423
423
424
424
// ...
425
425
public function buildForm(FormBuilderInterface $builder, array $options)
@@ -551,7 +551,7 @@ The solution is similar to allowing tags to be added.
551
551
552
552
Start by adding the ``allow_delete `` option in the form Type::
553
553
554
- // src/AppBundle/Form/Type/ TaskType.php
554
+ // src/AppBundle/Form/TaskType.php
555
555
556
556
// ...
557
557
public function buildForm(FormBuilderInterface $builder, array $options)
0 commit comments