Skip to content

Commit 49a311c

Browse files
[TwigBridge] Add new Twig bridge function to generate impersonation path
1 parent cda7c1a commit 49a311c

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

reference/twig_reference.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,24 @@ expression
286286
Creates an :class:`Symfony\\Component\\ExpressionLanguage\\Expression` related
287287
to the :doc:`ExpressionLanguage component </components/expression_language>`.
288288

289+
impersonation_path
290+
~~~~~~~~~~~~~~~~~~
291+
292+
.. code-block:: twig
293+
294+
{{ impersonation_path(identifier) }}
295+
296+
``identifier``
297+
**type**: ``string``
298+
299+
Generates a URL that you can visit to
300+
:doc:`impersonate a user </security/impersonating_user>`, identified by the
301+
``identifier`` argument.
302+
303+
.. versionadded:: 6.4
304+
305+
The ``impersonation_path()`` function was introduced in Symfony 6.4.
306+
289307
impersonation_exit_path
290308
~~~~~~~~~~~~~~~~~~~~~~~
291309

0 commit comments

Comments
 (0)