8000 Minor reword · symfony/symfony-docs@5fb2003 · GitHub
[go: up one dir, main page]

Skip to content

Commit 5fb2003

Browse files
Minor reword
1 parent 588333a commit 5fb2003

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

controller/service.rst

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -85,17 +85,15 @@ Then you can define it as a service as follows:
8585
Referring to the Service
8686
------------------------
8787

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::
9292

9393
$this->forward('AppBundle:Hello:index', array('name' => $name));
9494

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``::
9997

10098
$this->forward('app.hello_controller:indexAction', array('name' => $name));
10199

@@ -127,8 +125,8 @@ the route ``_controller`` value:
127125
128126
.. note::
129127

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.
132130

133131
.. tip::
134132

0 commit comments

Comments
 (0)
0