@@ -23,7 +23,7 @@ Simple Example: Transforming String Tags from User Input to an Array
23
23
24
24
Suppose you have a Task form with a tags ``text `` type::
25
25
26
- // src/AppBundle/Form/TaskType.php
26
+ // src/AppBundle/Form/Type/ TaskType.php
27
27
namespace AppBundle\Form\Type;
28
28
29
29
use AppBundle\Entity\Task;
@@ -55,7 +55,7 @@ This is a *perfect* time to attach a custom data transformer to the ``tags``
55
55
field. The easiest way to do this is with the :class: `Symfony\\ Component\\ Form\\ CallbackTransformer `
56
56
class::
57
57
58
- // src/AppBundle/Form/TaskType.php
58
+ // src/AppBundle/Form/Type/ TaskType.php
59
59
namespace AppBundle\Form\Type;
60
60
61
61
use Symfony\Component\Form\CallbackTransformer;
@@ -116,7 +116,7 @@ issue number.
116
116
117
117
Start by setting up the text field like normal::
118
118
119
- // src/AppBundle/Form/TaskType.php
119
+ // src/AppBundle/Form/Type/ TaskType.php
120
120
namespace AppBundle\Form\Type;
121
121
122
122
use AppBundle\Entity\Task;
@@ -247,7 +247,7 @@ of the entity manager (because ``IssueToNumberTransformer`` needs this).
247
247
No problem! Just add a ``__construct() `` function to ``TaskType `` and force this
248
248
to be passed in. Then, you can easily create and add the transformer::
249
249
250
- // src/AppBundle/Form/TaskType.php
250
+ // src/AppBundle/Form/Type/ TaskType.php
251
251
namespace AppBundle\Form\Type;
252
252
253
253
use AppBundle\Form\DataTransformer\IssueToNumberTransformer;
@@ -418,7 +418,7 @@ it's recognized as a custom field type:
418
418
Now, whenever you need to use your special ``issue_selector `` field type,
419
419
it's quite easy::
420
420
421
- // src/AppBundle/Form/TaskType.php
421
+ // src/AppBundle/Form/Type/ TaskType.php
422
422
namespace AppBundle\Form\Type;
423
423
424
424
use AppBundle\Form\DataTransformer\IssueToNumberTransformer;
0 commit comments