File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -410,10 +410,10 @@ return a ``Response``.
410
410
.. sidebar :: ``kernel.view`` in the Symfony Framework
411
411
412
412
There is a default listener inside the Symfony Framework for the ``kernel.view ``
413
- event. If your controller returns an array, and you place the
414
- :ref: `#[Template()] attribute <templates-template-attribute >` above the
415
- controller, then this listener renders a template, passes the array you
416
- returned from your controller to that template, and creates a ``Response ``
413
+ event. If your controller action returns an array, and you apply the
414
+ :ref: `#[Template()] attribute <templates-template-attribute >` to that
415
+ controller action , then this listener renders a template, passes the array
416
+ you returned from your controller to that template, and creates a ``Response ``
417
417
containing the returned content from that template.
418
418
419
419
Additionally, a popular community bundle `FOSRestBundle `_ implements
Original file line number Diff line number Diff line change @@ -484,7 +484,7 @@ to define the template to render::
484
484
class ProductController extends AbstractController
485
485
{
486
486
#[Template('product/index.html.twig')]
487
- public function index(): Response
487
+ public function index()
488
488
{
489
489
// ...
490
490
You can’t perform that action at this time.
0 commit comments