Skip to content

Commit 94eb5c0

Browse files
committed
fix argument name
1 parent 28ccb7f commit 94eb5c0

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

reference/twig_reference.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -498,10 +498,10 @@ The ``inline`` argument is the level where you switch to inline YAML:
498498
}
499499
} %}
500500
501-
{{ array|yaml_encode(0) }}
501+
{{ array|yaml_encode(inline = 0) }}
502502
{# output: { a: { c: e }, b: { d: f } } #}
503503
504-
{{ array|yaml_encode(1) }}
504+
{{ array|yaml_encode(inline = 1) }}
505505
{# output: a: { c: e } b: { d: f } #}
506506
507507
The ``dumpObjects`` argument is used to dump objects::
@@ -513,10 +513,10 @@ The ``dumpObjects`` argument is used to dump objects::
513513

514514
.. code-block:: twig
515515
516-
{{ object|yaml_encode(0, false) }}
516+
{{ object|yaml_encode(dumpObjects = false) }}
517517
{# output: null #}
518518
519-
{{ object|yaml_encode(0, true) }}
519+
{{ object|yaml_encode(dumpObjects = true) }}
520520
{# output: !php/object 'O:8:"stdClass":1:{s:5:"foo";s:7:"bar";}' #}
521521
522522
See :ref:`components-yaml-dump` for more information.
@@ -551,10 +551,10 @@ The ``inline`` argument is the level where you switch to inline YAML:
551551
}
552552
} %}
553553
554-
{{ array|yaml_dump(0) }}
554+
{{ array|yaml_dump(inline = 0) }}
555555
{# output: %array% { a: { c: e }, b: { d: f } } #}
556556
557-
{{ array|yaml_dump(1) }}
557+
{{ array|yaml_dump(inline = 1) }}
558558
{# output: %array% a: { c: e } b: { d: f } #}
559559
560560
The ``dumpObjects`` argument is used to dump objects::
@@ -566,10 +566,10 @@ The ``dumpObjects`` argument is used to dump objects::
566566

567567
.. code-block:: twig
568568
569-
{{ object|yaml_dump(0, false) }}
569+
{{ object|yaml_dump(dumpObjects = false) }}
570570
{# output: %object% null #}
571571
572-
{{ object|yaml_dump(0, true) }}
572+
{{ object|yaml_dump(dumpObjects = true) }}
573573
{# output: %object% !php/object 'O:8:"stdClass":1:{s:3:"foo";s:3:"bar";}' #}
574574
575575
abbr_class

0 commit comments

Comments
 (0)