Skip to content

Commit 4787bba

Browse files
committed
Rewords
1 parent 093401e commit 4787bba

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

reference/twig_reference.rst

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -277,9 +277,15 @@ impersonation_exit_path
277277
``exitTo`` *(optional)*
278278
**type**: ``string``
279279

280-
Generates a relative URL to exit impersonation. If `exitTo` is specified it will use its value to build the URl,
281-
elsewhere it will use the current URI.
282-
If we are not impersonating a user, it will return an empty string.
280+
.. versionadded:: 5.2
281+
282+
The ``impersonation_exit_path()` function was introduced in Symfony 5.2.
283+
284+
Generates a URL that you can visit to exit :doc:`user impersonation </security/impersonating_user>`.
285+
After exiting impersonation, the user is redirected to the current URI. If you
286+
prefer to redirect to a different URI, define its value in the ``exitTo`` argument.
287+
288+
If no user is being impersonated, the function returns an empty string.
283289

284290
impersonation_exit_url
285291
~~~~~~~~~~~~~~~~~~~~~~
@@ -291,8 +297,12 @@ impersonation_exit_url
291297
``exitTo`` *(optional)*
292298
**type**: ``string``
293299

294-
Equal to the `impersonation_exit_path`_ function, but it'll generate an absolute URL
295-
instead of a relative one.
300+
.. versionadded:: 5.2
301+
302+
The ``impersonation_exit_url()` function was introduced in Symfony 5.2.
303+
304+
It's similar to the `impersonation_exit_path`_ function, but it generates
305+
absolute URLs instead of relative URLs.
296306
297307
Form Related Functions
298308
~~~~~~~~~~~~~~~~~~~~~~

0 commit comments

Comments
 (0)