@@ -85,17 +85,15 @@ Then you can define it as a service as follows:
85
85
Referring to the Service
86
86
------------------------
87
87
88
- If the fully-qualified class name (FQCN) of your controller is also the id of
89
- your service then you can refer to your controller using the usual notations.
90
- For example, to forward to the ``indexAction() `` method of the service
91
- defined above with the id `` AppBundle\Controller\HelloController `` ::
88
+ If the service id is the fully-qualified class name (FQCN) of your controller,
89
+ you can keep using the usual notation. For example, to forward to the
90
+ ``indexAction() `` method of the above `` AppBundle\Controller\HelloController ``
91
+ service ::
92
92
93
93
$this->forward('AppBundle:Hello:index', array('name' => $name));
94
94
95
- To refer to a controller that's defined as a service whose ID is not your
96
- controller fully-qualified class name (FQCN), use the single colon (:)
97
- notation. For example, to forward to the ``indexAction() `` method of a service
98
- defined with the id ``app.hello_controller ``::
95
+ Otherwise, use the single colon (``: ``) notation. For example, to forward to the
96
+ ``indexAction() `` method of a service with the id ``app.hello_controller ``::
99
97
100
98
$this->forward('app.hello_controller:indexAction', array('name' => $name));
101
99
@@ -127,8 +125,8 @@ the route ``_controller`` value:
127
125
128
126
.. note ::
129
127
130
- You cannot drop the ``Action `` part of the method name when using this
131
- syntax .
128
+ You cannot drop the ``Action `` part of the method name when using the
129
+ single colon notation .
132
130
133
131
.. tip ::
134
132
0 commit comments