{% extends 'WebProfilerBundle:Profiler:layout.html.twig' %} {% block toolbar %} {% set profiler_markup_version = profiler_markup_version|default(1) %}
{% if profiler_markup_version == 1 %}
{# fake image span #} {{ collector.getTotalBlock() }} blocks
{% else %}
{{ include('@SonataBlock/Profiler/icon.svg') }} {{ collector.getTotalBlock() }}
{% endif %}
Real Blocks {{ collector.realBlocks|length }}
Containers {{ collector.containers|length }}
{% if profiler_markup_version == 1 %} {# don't show the total number of blocks in the info in the new design, it's already shown in the toolbar #}
Total Blocks {{ collector.getTotalBlock() }}
{% endif %}
{% if profiler_markup_version == 1 %}
{% endif %} Events {{ collector.events|length }}
{% endblock %} {% block menu %} {{ include('@SonataBlock/Profiler/icon.svg') }} Blocks{% if collector.events|length > 0 %}*{% endif %} {{ collector.getTotalBlock() }} {% endblock %} {% block panel %} {# NEXT_MAJOR : remove this when Symfony Requirement will be bumped to 2.8+ #} {% set profiler_markup_version = profiler_markup_version|default(1) %}

Events Blocks

{% for event in collector.events %} {% endfor %}
code name listener tag Block types Listeners
{{ event['template_code'] }} {{ event['event_name'] }} {% for type in event['blocks'] %} {{ type.1 }} (id:{{ type.0 }}) {% else %} no block returned {% endfor %} {% for listener in event['listeners'] %} {{ listener }} {% else %} no listener registered {% endfor %}

Real Blocks

{% set blocks = collector.realBlocks %} {% if profiler_markup_version == 1 %} {{ block('table') }} {% else %}
{{ block('table_v2') }}
{% endif %}

Containers Blocks

{% set blocks = collector.containers %} {% if profiler_markup_version == 1 %} {{ block('table') }} {% else %}
{{ block('table_v2') }}
{% endif %} {% endblock %} {% block table %} {% for id, block in blocks %} {% set rowspan = 1 %} {% if block.cache.handler %} {% set rowspan = rowspan + 1 %} {% endif %} {% if block.assets.js|length > 0 or block.assets.css|length > 0 %} {% set rowspan = rowspan + 1 %} {% endif %} {% if block.cache.handler %} {% endif %} {% if block.assets.js|length > 0 or block.assets.css|length > 0 %} {% endif %} {% endfor %}
Id Name Type Mem. (diff) Mem. (peak) Duration
{{ id }} {{ block.name }} {{ block.type }} {{ ((block.memory_end-block.memory_start)/1000)|number_format(0) }} Kb {{ (block.memory_peak/1000)|number_format(0) }} Kb {{ block.duration|number_format(2) }} ms
Cache Keys:
{{ block.cache.keys|json_encode() }}

Contextual Keys:
{{ block.cache.contextual_keys|json_encode() }}
TTL: {{ block.cache.ttl }}s.
Lifetime: {{ block.cache.lifetime }}s.
Backend: {{ block.cache.handler }}
Loading from cache: {% if block.cache.from_cache %}YES{% else %}NO{% endif %}
Javascripts:
{{ block.assets.js|json_encode() }}

Stylesheets:
{{ block.assets.css|json_encode() }}
{% endblock %} {% block table_v2 %} {% for id, block in blocks %} {% if block.cache.handler %} {% endif %} {% if block.assets.js|length > 0 or block.assets.css|length > 0 %} {% endif %}
Block {{ id }}
Name {{ block.name }}
Type {{ block.type }}
Mem. diff / Mem. peak / Duration {{ ((block.memory_end-block.memory_start)/1000)|number_format(0) }} Kb / {{ (block.memory_peak/1000)|number_format(0) }} Kb / {{ block.duration|number_format(2) }} ms
Cache backend {{ block.cache.handler }} - Loading from cache: {% if block.cache.from_cache %}YES{% else %}NO{% endif %}
Cache TTL / Lifetime {{ block.cache.ttl }}s. / {{ block.cache.lifetime }}s
Cache Informations Cache Keys:
{{ block.cache.keys|json_encode() }}

Contextual Keys:
{{ block.cache.contextual_keys|json_encode() }}

Assets Javascripts:
{{ block.assets.js|json_encode() }}

Stylesheets:
{{ block.assets.css|json_encode() }}
{% endfor %} {% endblock %}