8000 using the aliases entity manager service name · symfony/symfony-docs@cd329e7 · GitHub
[go: up one dir, main page]

Skip to content

Commit cd329e7

Browse files
committed
using the aliases entity manager service name
1 parent d7ca26b commit cd329e7

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

cookbook/form/data_transformers.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -365,19 +365,20 @@ it's recognized as a custom field type:
365365

366366
.. code-block:: yaml
367367
368+
# app/config/services.yml
368369
services:
369370
app.type.issue_selector:
370371
class: AppBundle\Form\IssueSelectorType
371-
arguments: ["@doctrine.orm.default_entity_manager"]
372+
arguments: ["@doctrine.orm.entity_manager"]
372373
tags:
373374
- { name: form.type, alias: issue_selector }
374375
375376
376377
.. code-block:: xml
377-
378+
378379
<service id="app.type.issue_selector"
379380
class="AppBundle\Form\IssueSelectorType">
380-
<argument type="service" id="doctrine.orm.default_entity_manager"/>
381+
<argument type="service" id="doctrine.orm.entity_manager"/>
381382
<tag name="form.type" alias="issue_selector" />
382383
</service>
383384
@@ -391,7 +392,7 @@ it's recognized as a custom field type:
391392
->setDefinition('app.type.issue_selector', new Definition(
392393
'AppBundle\Form\IssueSelectorType'
393394
), array(
394-
new Reference('doctrine.orm.default_entity_manager'),
395+
new Reference('doctrine.orm.entity_manager'),
395396
))
396397
->addTag('form.type', array(
397398
'alias' => 'issue_selector',

0 commit comments

Comments
 (0)
0