@@ -409,12 +409,12 @@ return a ``Response``.
409
409
410
410
.. sidebar :: ``kernel.view`` in the Symfony Framework
411
411
412
- There is no default listener inside the Symfony Framework for the ``kernel.view ``
413
- event. However, ` SensioFrameworkExtraBundle `_ * does * add a listener to this
414
- event. If your controller returns an array, and you place the ` @Template `_
415
- annotation above the controller, then this listener renders a template,
416
- passes the array you returned from your controller to that template, and
417
- creates a `` Response `` containing the returned content from that template.
412
+ There is a default listener inside the Symfony Framework for the ``kernel.view ``
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
+ containing the returned content from that template.
418
418
419
419
Additionally, a popular community bundle `FOSRestBundle `_ implements
420
420
a listener on this event which aims to give you a robust view layer
@@ -751,5 +751,4 @@ Learn more
751
751
.. _`PHP FPM` : https://www.php.net/manual/en/install.fpm.php
752
752
.. _`SensioFrameworkExtraBundle` : https://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/index.html
753
753
.. _`@ParamConverter` : https://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/annotations/converters.html
754
- .. _`@Template` : https://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/annotations/view.html
755
754
.. _variadic : https://www.php.net/manual/en/functions.arguments.php#functions.variable-arg-list
0 commit comments