Skip to content

Commit fcb1bce

Browse files
committed
Added new functions
1 parent b69bbec commit fcb1bce

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

reference/twig_reference.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,16 @@ Functions
4545
| ``form_rest(form, variables = {})`` | This will render all fields that have not yet been rendered, more |
4646
| | information in :ref:`the Twig Form reference<reference-forms-twig-rest>`. |
4747
+----------------------------------------------------+--------------------------------------------------------------------------------------------+
48+
| ``csrf_token(intention)`` | This will render a CSRF token, use this function if you want CSRF protection without |
49+
| | creating a form |
50+
+----------------------------------------------------+--------------------------------------------------------------------------------------------+
4851
| ``is_granted(role, object = null, field = null)`` | This will return ``true`` if the current user has the required role, more |
4952
| | information in ":ref:`book-security-template`" |
5053
+----------------------------------------------------+--------------------------------------------------------------------------------------------+
54+
| ``logout_path(key)`` | This will generate the relative logout URL for the given firewall |
55+
+----------------------------------------------------+--------------------------------------------------------------------------------------------+
56+
| ``logout_url(key)`` | Equal to ``logout_path(...)`` but this will generate an absolute url |
57+
+----------------------------------------------------+--------------------------------------------------------------------------------------------+
5158
| ``path(name, parameters = {})`` | Get a relative url for the given route, more information in |
5259
| | ":ref:`book-templating-pages`". |
5360
+----------------------------------------------------+--------------------------------------------------------------------------------------------+

0 commit comments

Comments
 (0)