Skip to content

Commit abf8664

Browse files
committed
minor #8316 Update data_transformers.rst (atailouloute)
This PR was merged into the 2.7 branch. Discussion ---------- Update data_transformers.rst Commits ------- 8480fcf Update data_transformers.rst
2 parents 9859277 + 8480fcf commit abf8664

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

form/data_transformers.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Simple Example: Transforming String Tags from User Input to an Array
2323

2424
Suppose you have a Task form with a tags ``text`` type::
2525

26-
// src/AppBundle/Form/TaskType.php
26+
// src/AppBundle/Form/Type/TaskType.php
2727
namespace AppBundle\Form\Type;
2828

2929
use AppBundle\Entity\Task;
@@ -55,7 +55,7 @@ This is a *perfect* time to attach a custom data transformer to the ``tags``
5555
field. The easiest way to do this is with the :class:`Symfony\\Component\\Form\\CallbackTransformer`
5656
class::
5757

58-
// src/AppBundle/Form/TaskType.php
58+
// src/AppBundle/Form/Type/TaskType.php
5959
namespace AppBundle\Form\Type;
6060

6161
use Symfony\Component\Form\CallbackTransformer;
@@ -116,7 +116,7 @@ issue number.
116116

117117
Start by setting up the text field like normal::
118118

119-
// src/AppBundle/Form/TaskType.php
119+
// src/AppBundle/Form/Type/TaskType.php
120120
namespace AppBundle\Form\Type;
121121

122122
use AppBundle\Entity\Task;
@@ -247,7 +247,7 @@ of the entity manager (because ``IssueToNumberTransformer`` needs this).
247247
No problem! Just add a ``__construct()`` function to ``TaskType`` and force this
248248
to be passed in. Then, you can easily create and add the transformer::
249249

250-
// src/AppBundle/Form/TaskType.php
250+
// src/AppBundle/Form/Type/TaskType.php
251251
namespace AppBundle\Form\Type;
252252

253253
use AppBundle\Form\DataTransformer\IssueToNumberTransformer;
@@ -418,7 +418,7 @@ it's recognized as a custom field type:
418418
Now, whenever you need to use your special ``issue_selector`` field type,
419419
it's quite easy::
420420

421-
// src/AppBundle/Form/TaskType.php
421+
// src/AppBundle/Form/Type/TaskType.php
422422
namespace AppBundle\Form\Type;
423423

424424
use AppBundle\Form\DataTransformer\IssueToNumberTransformer;

0 commit comments

Comments
 (0)