File tree Expand file tree Collapse file tree 1 file changed +8
-18
lines changed Expand file tree Collapse file tree 1 file changed +8
-18
lines changed Original file line number Diff line number Diff line change @@ -120,24 +120,12 @@ the route ``_controller`` value:
120
120
'_controller' => 'acme.hello.controller:indexAction',
121
121
)));
122
122
123
- Using Annotation Routing
124
- ~~~~~~~~~~~~~~~~~~~~~~~~
123
+ .. tip ::
125
124
126
- When using annotations to configure routing using a controller defined as a
127
- service, you need to specify the service id as follows::
128
-
129
- use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
130
-
131
- /**
132
- * @Route("/hello", service="acme.hello.controller")
133
- */
134
- class HelloController extends Controller
135
- {
136
- // ...
137
- }
138
-
139
- This is documented in the :doc: `/bundles/SensioFrameworkExtraBundle/annotations/routing `
140
- chapter.
125
+ You can also use annotations to configure routing using a controller
126
+ defined as a service. See the
127
+ :doc: `FrameworkExtraBundle documentation</bundles/SensioFrameworkExtraBundle/annotations/routing> `
128
+ for details.
141
129
142
130
Alternatives to Base Controller Methods
143
131
---------------------------------------
@@ -224,7 +212,9 @@ argument:
224
212
<!-- src/Acme/HelloBundle/Resources/config/services.xml -->
225
213
<parameters >
226
214
<!-- ... -->
227
- <parameter key =" acme.controller.hello.class" >Acme\HelloBundle\Controller\HelloController</parameter >
215
+ <parameter
216
+ key =" acme.controller.hello.class"
217
+ >Acme\HelloBundle\Controller\HelloController</parameter >
228
218
</parameters >
229
219
230
220
<services >
You can’t perform that action at this time.
0 commit comments