@@ -485,7 +485,7 @@ yaml_encode
485
485
486
486
Transforms the input into YAML syntax.
487
487
488
- The ``inline `` argument is the level where you switch to inline YAML:
488
+ The ``inline `` argument is the level where the generated output switches to inline YAML:
489
489
490
490
.. code-block :: twig
491
491
@@ -499,12 +499,15 @@ The ``inline`` argument is the level where you switch to inline YAML:
499
499
} %}
500
500
501
501
{{ array|yaml_encode(inline = 0) }}
502
- {# output: { a: { c: e }, b: { d: f } } #}
502
+ {# output:
503
+ { a: { c: e }, b: { d: f } } #}
503
504
504
505
{{ array|yaml_encode(inline = 1) }}
505
- {# output: a: { c: e } b: { d: f } #}
506
+ {# output:
507
+ a: { c: e }
508
+ b: { d: f } #}
506
509
507
- The ``dumpObjects `` argument is used to dump objects::
510
+ The ``dumpObjects `` argument enables the dumping of PHP objects::
508
511
509
512
// ...
510
513
$object = new \stdClass();
@@ -538,7 +541,7 @@ yaml_dump
538
541
Does the same as `yaml_encode() <yaml_encode >`_, but includes the type in
539
542
the output.
540
543
541
- The ``inline `` argument is the level where you switch to inline YAML:
544
+ The ``inline `` argument is the level where the generated output switches to inline YAML:
542
545
543
546
.. code-block :: twig
544
547
@@ -552,12 +555,15 @@ The ``inline`` argument is the level where you switch to inline YAML:
552
555
} %}
553
556
554
557
{{ array|yaml_dump(inline = 0) }}
555
- {# output: %array% { a: { c: e }, b: { d: f } } #}
558
+ {# output:
559
+ %array% { a: { c: e }, b: { d: f } } #}
556
560
557
561
{{ array|yaml_dump(inline = 1) }}
558
- {# output: %array% a: { c: e } b: { d: f } #}
562
+ {# output:
563
+ %array% a: { c: e }
564
+ b: { d: f } #}
559
565
560
- The ``dumpObjects `` argument is used to dump objects::
566
+ The ``dumpObjects `` argument enables the dumping of PHP objects::
561
567
562
568
// ...
563
569
$object = new \stdClass();
0 commit comments