Skip to content

Commit f7ec98c

Browse files
committed
Added tip at a more logical place
1 parent 034d69a commit f7ec98c

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

book/doctrine.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,16 @@ of the bundle:
517517
If you're following along with this example, you'll need to create a
518518
route that points to this action to see it work.
519519

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+
520530
Take a look at the previous example in more detail:
521531

522532
* **lines 9-12** In this section, you instantiate and work with the ``$product``

0 commit comments

Comments
 (0)