We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parent034d69a commitf7ec98cCopy full SHA for f7ec98c
book/doctrine.rst
@@ -517,6 +517,16 @@ of the bundle:
517
If you're following along with this example, you'll need to create a
518
route that points to this action to see it work.
519
520
+..tip::
521
+
522
+ This page shows working with Doctrine within a controller. You may also
523
+ want to work with Doctrine elsewhere in your application. The
524
+:method:`Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller::getDoctrine`
525
+ method of the controller returns the ``doctrine`` service, you can work with
526
+ this in the same way elsewhere by injecting this into your own
527
+ services. See:doc:`/book/service_container` for more on creating
528
+ your own services.
529
530
Take a look at the previous example in more detail:
531
532
* **lines 9-12** In this section, you instantiate and work with the ``$product``