Skip to content

Commit

Permalink
using the aliases entity manager service name
Browse files Browse the repository at this point in the history
  • Loading branch information
weaverryan committed Jul 8, 2015
1 parent 9be07f0 commit 1514fdd
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions cookbook/form/data_transformers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -365,19 +365,20 @@ it's recognized as a custom field type:

.. code-block:: yaml
# app/config/services.yml
services:
app.type.issue_selector:
class: AppBundle\Form\IssueSelectorType
arguments: ["@doctrine.orm.default_entity_manager"]
arguments: ["@doctrine.orm.entity_manager"]
tags:
- { name: form.type, alias: issue_selector }
.. code-block:: xml
<service id="app.type.issue_selector"
class="AppBundle\Form\IssueSelectorType">
<argument type="service" id="doctrine.orm.default_entity_manager"/>
<argument type="service" id="doctrine.orm.entity_manager"/>
<tag name="form.type" alias="issue_selector" />
</service>
Expand All @@ -391,7 +392,7 @@ it's recognized as a custom field type:
->setDefinition('app.type.issue_selector', new Definition(
'AppBundle\Form\IssueSelectorType'
), array(
new Reference('doctrine.orm.default_entity_manager'),
new Reference('doctrine.orm.entity_manager'),
))
->addTag('form.type', array(
'alias' => 'issue_selector',
Expand Down

0 comments on commit 1514fdd

Please sign in to comment.