@@ -498,10 +498,10 @@ The ``inline`` argument is the level where you switch to inline YAML:
498
498
}
499
499
} %}
500
500
501
- {{ array|yaml_encode(0) }}
501
+ {{ array|yaml_encode(inline = 0) }}
502
502
{# output: { a: { c: e }, b: { d: f } } #}
503
503
504
- {{ array|yaml_encode(1) }}
504
+ {{ array|yaml_encode(inline = 1) }}
505
505
{# output: a: { c: e } b: { d: f } #}
506
506
507
507
The ``dumpObjects `` argument is used to dump objects::
@@ -513,10 +513,10 @@ The ``dumpObjects`` argument is used to dump objects::
513
513
514
514
.. code-block :: twig
515
515
516
- {{ object|yaml_encode(0, false) }}
516
+ {{ object|yaml_encode(dumpObjects = false) }}
517
517
{# output: null #}
518
518
519
- {{ object|yaml_encode(0, true) }}
519
+ {{ object|yaml_encode(dumpObjects = true) }}
520
520
{# output: !php/object 'O:8:"stdClass":1:{s:5:"foo";s:7:"bar";}' #}
521
521
522
522
See :ref: `components-yaml-dump ` for more information.
@@ -551,10 +551,10 @@ The ``inline`` argument is the level where you switch to inline YAML:
551
551
}
552
552
} %}
553
553
554
- {{ array|yaml_dump(0) }}
554
+ {{ array|yaml_dump(inline = 0) }}
555
555
{# output: %array% { a: { c: e }, b: { d: f } } #}
556
556
557
- {{ array|yaml_dump(1) }}
557
+ {{ array|yaml_dump(inline = 1) }}
558
558
{# output: %array% a: { c: e } b: { d: f } #}
559
559
560
560
The ``dumpObjects `` argument is used to dump objects::
@@ -566,10 +566,10 @@ The ``dumpObjects`` argument is used to dump objects::
566
566
567
567
.. code-block :: twig
568
568
569
- {{ object|yaml_dump(0, false) }}
569
+ {{ object|yaml_dump(dumpObjects = false) }}
570
570
{# output: %object% null #}
571
571
572
- {{ object|yaml_dump(0, true) }}
572
+ {{ object|yaml_dump(dumpObjects = true) }}
573
573
{# output: %object% !php/object 'O:8:"stdClass":1:{s:3:"foo";s:3:"bar";}' #}
574
574
575
575
abbr_class
0 commit comments