mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-15 11:56:50 +00:00
added missing documentation for the random function
This commit is contained in:
@@ -7,6 +7,7 @@ Functions
|
||||
range
|
||||
cycle
|
||||
constant
|
||||
random
|
||||
attribute
|
||||
block
|
||||
parent
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
``random``
|
||||
==========
|
||||
|
||||
.. versionadded:: 1.5
|
||||
The random function was added in Twig 1.5.
|
||||
|
||||
The ``random`` function returns a random item from a sequence:
|
||||
|
||||
.. code-block:: jinja
|
||||
|
||||
{{ random(['apple', 'orange', 'citrus']) }}
|
||||
Reference in New Issue
Block a user