Skip to content

Commit 88d20b3

Browse files
committed
Merge branch '5.4' into 6.0
* 5.4: Link to a reference [FrameworkBundle][HttpKernel][TwigBridge] Add an helper to generate fragments URL
2 parents d09485d + a6f75ec commit 88d20b3

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

reference/twig_reference.rst

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,28 @@ falls back to the behavior of `render`_ otherwise.
6363
in the function name, e.g. ``render_hinclude()`` will use the hinclude.js
6464
strategy. This works for all ``render_*()`` functions.
6565

66+
fragment_uri
67+
~~~~~~~~~~~~
68+
69+
.. code-block:: twig
70+
71+
{{ fragment_uri(controller, absolute = false, strict = true, sign = true) }}
72+
73+
``controller``
74+
**type**: ``ControllerReference``
75+
``absolute`` *(optional)*
76+
**type**: ``boolean`` **default**: ``false``
77+
``strict`` *(optional)*
78+
**type**: ``boolean`` **default**: ``true``
79+
``sign`` *(optional)*
80+
**type**: ``boolean`` **default**: ``true``
81+
82+
Generates the URI of :ref:`a fragment <fragments-path-config>`.
83+
84+
.. versionadded:: 5.3
85+
86+
The ``fragment_uri()`` function was introduced in Symfony 5.3.
87+
6688
controller
6789
~~~~~~~~~~
6890

0 commit comments

Comments
 (0)