Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
minor #3545 Example of getting entity managers directly from the cont…
…ainer (colinodell) This PR was merged into the 2.3 branch. Discussion ---------- Example of getting entity managers directly from the container The documentation didn't provide examples of how to obtain the entity managers directly from the DI container. This is useful when needing to inject the em into other services. The ems are added to the container using the service id `doctrine.orm.%s_entity_manager`, where `%s` is the em's name. This is done by [`\Doctrine\Bundle\DoctrineBundle\DependencyInjection\DoctrineExtension::loadOrmEntityManager()`](https://github.com/doctrine/DoctrineBundle/blob/v1.0.0/DependencyInjection/DoctrineExtension.php#L342) | Q | A | ------------- | --- | Doc fix? | no | New docs? | yes? (added example of existing feature) | Applies to | all (doctrine/doctrine-bundle v1.0.0+) | Fixed tickets | n/a Commits ------- eb7594c Example of getting entity managers directly from the container
- Loading branch information