Skip to content

Commit

Permalink
dump
Browse files Browse the repository at this point in the history
  • Loading branch information
ArnaudLigny committed Dec 5, 2023
1 parent 16bb68c commit 7cdb95c
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 14 deletions.
2 changes: 1 addition & 1 deletion tests/fixtures/website/layouts/assets.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@
<p>
<pre>{% verbatim %}{{ asset('ISS.jpg').exif }}{% endverbatim %}</pre>
<blockquote>
{{- dump(asset('ISS.jpg').exif) -}}
{{- d(asset('ISS.jpg').exif) -}}
</blockquote>
</p>
<h3>Image `srcset`</h3>
Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures/website/layouts/data.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ XML:
</ul>
CSV:
<pre>
{{ dump(site.data.subdir.subsub.csv) }}
{{ d(site.data.subdir.subsub.csv) }}
</pre>
{% endblock %}
2 changes: 1 addition & 1 deletion tests/fixtures/website/layouts/fmvariables.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<pre>
page.fmvariables:
{{ dump(page.fmvariables) }}
{{ d(page.fmvariables) }}
</pre>

{% endblock content %}
12 changes: 6 additions & 6 deletions tests/fixtures/website/layouts/functions_and_filters.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,18 @@

<h3>json_decode</h3>
<pre>{% verbatim %}{{ asset('json.json').content|json_decode}}{% endverbatim %}</pre>
<pre>{{ dump(asset('json.json').content|json_decode) }}</pre>
<pre>{{ d(asset('json.json').content|json_decode) }}</pre>

<h3>yaml_parse</h3>
<pre>{% verbatim %}{{ asset('yaml.yml').content|yaml_parse }}{% endverbatim %}</pre>
<pre>{{ dump(asset('yaml.yml').content|yaml_parse) }}</pre>
<pre>{{ d(asset('yaml.yml').content|yaml_parse) }}</pre>

<h3>hex_to_rgb</h3>
<pre>{% verbatim %}{{ dump('#0A66C2'|hex_to_rgb) }}{% endverbatim %}</pre>
<pre>{{ dump('#0A66C2'|hex_to_rgb) }}</pre>
<pre>{% verbatim %}{{ d('#0A66C2'|hex_to_rgb) }}{% endverbatim %}</pre>
<pre>{{ d('#0A66C2'|hex_to_rgb) }}</pre>

<h3>splitline</h3>
<pre>{% verbatim %}{{ dump('This is a test of the splitline filter.'|splitline) }}{% endverbatim %}</pre>
<pre>{{ dump('This is a test of the splitline filter.'|splitline) }}</pre>
<pre>{% verbatim %}{{ d('This is a test of the splitline filter.'|splitline) }}{% endverbatim %}</pre>
<pre>{{ d('This is a test of the splitline filter.'|splitline) }}</pre>

{% endblock content %}
4 changes: 2 additions & 2 deletions tests/fixtures/website/layouts/static.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
<li>name: {{ file.name }}</li>
<li>basename: {{ file.basename }}</li>
<li>ext: {{ file.ext }}</li>
<li>exif: <pre>{{ dump(file.exif|default({})) }}</pre></li>
<li>audio: <pre>{{ dump(file.audio|default) }}</pre></li>
<li>exif: <pre>{{ d(file.exif|default({})) }}</pre></li>
<li>audio: <pre>{{ d(file.audio|default) }}</pre></li>
</ul>
</li>
{% endfor %}
Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures/website/layouts/taxo.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
</ul>

Debug:<br/>
<pre>{{ dump(site.taxonomies) }}</pre>
<pre>{{ d(site.taxonomies) }}</pre>

{% endblock content %}
2 changes: 1 addition & 1 deletion tests/fixtures/website/layouts/variables.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{% block content %}

<pre>
{{ dump(page.variables) }}
{{ d(page.variables) }}
</pre>

{% endblock %}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<li>folder: {{ item.folder }}</li>
<li>slug: {{ item.slug }}</li>
{% if item.menu is defined %}
<li>menu: {{ dump(item.menu) }}</li>
<li>menu: {{ d(item.menu) }}</li>
{% endif %}
{% if item.weight is defined %}
<li>weight: {{ item.weight }}</li>
Expand Down
2 changes: 2 additions & 0 deletions tests/fixtures/website/themes/a-theme/layouts/index.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

{% block content %}

{{ d(site.menus) }}

<details>
<summary>All pages</summary>
<ul>
Expand Down

0 comments on commit 7cdb95c

Please sign in to comment.