Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit fcb1bce

Browse filesBrowse files
committed
Added new functions
1 parent b69bbec commit fcb1bce
Copy full SHA for fcb1bce

File tree

Expand file treeCollapse file tree

1 file changed

+7
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+7
-0
lines changed

‎reference/twig_reference.rst

Copy file name to clipboardExpand all lines: reference/twig_reference.rst
+7Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.