@@ -20,21 +20,28 @@ Functions
20
20
.. versionadded :: 2.1
21
21
The ``csrf_token ``, ``logout_path `` and ``logout_url `` functions were added in Symfony2.1
22
22
23
+ .. versionadded :: 2.3
24
+ The ``render `` and ``controller `` functions are new in Symfony 2.2. Prior,
25
+ the ``{% render %} `` tag was used and had a different signature.
26
+
23
27
+----------------------------------------------------+--------------------------------------------------------------------------------------------+
24
28
| Function Syntax | Usage |
25
29
+====================================================+============================================================================================+
26
- | ``render(controller('B:C:a', {params})) `` | This will render the Response Content for the given controller or |
27
- | ``render(path('route', {params})) `` | URL. For more information, see :ref: `templating-embedding-controller `. |
30
+ | ``render(uri, options = {}) `` | This will render the Response Content for the given controller or |
31
+ | ``render(controller('B:C:a', {params})) `` | URL. For more information, see :ref: `templating-embedding-controller `. |
32
+ | ``render(path('route', {params})) `` | |
28
33
| ``render(url('route', {params})) `` | |
29
34
+----------------------------------------------------+--------------------------------------------------------------------------------------------+
30
35
| ``render_esi(controller('B:C:a', {params})) `` | This will generates an ESI tag when possible or fallback to the ``render `` |
31
36
| ``render_esi(url('route', {params})) `` | behavior otherwise. For more information, see :ref: `templating-embedding-controller `. |
32
37
| ``render_esi(path('route', {params})) `` | |
33
38
+----------------------------------------------------+--------------------------------------------------------------------------------------------+
34
- | ``render_hinclude(controller('B:C:a', {params} )) `` | This will generates an Hinclude tag for the given controller or URL. |
39
+ | ``render_hinclude(controller(... )) `` | This will generates an Hinclude tag for the given controller or URL. |
35
40
| ``render_hinclude(url('route', {params})) `` | For more information, see :ref: `templating-embedding-controller `. |
36
41
| ``render_hinclude(path('route', {params})) `` | |
37
42
+----------------------------------------------------+--------------------------------------------------------------------------------------------+
43
+ | ``controller(attributes = {}, query = {}) `` | Used along with the ``render `` tag to refer to the controller that you want to render |
44
+ +----------------------------------------------------+--------------------------------------------------------------------------------------------+
38
45
| ``asset(path, packageName = null) `` | Get the public path of the asset, more information in |
39
46
| | ":ref: `book-templating-assets `". |
40
47
+----------------------------------------------------+--------------------------------------------------------------------------------------------+
0 commit comments