{% extends '@WebProfiler/Profiler/layout.html.twig' %} {% import _self as phpcr %} {% block toolbar %} {% if collector.callcount > 0 %} {% set profiler_markup_version = profiler_markup_version|default(1) %} {% set icon %} {% if profiler_markup_version == 1 %} Database {{ collector.callcount }} {% if collector.callcount > 0 %} in {{ '%0.2f'|format(collector.time * 1000) }} ms {% endif %} {% else %} {% set status = collector.callcount > 50 ? 'yellow' %} {{ include('@DoctrinePHPCR/Collector/icon.svg') }} {{ collector.callcount }} in {{ '%0.2f'|format(collector.time * 1000) }} ms {% endif %} {% endset %} {% set text %}
PHPCR Calls {{ collector.callcount }}
Call time {{ '%0.2f'|format(collector.time * 1000) }} ms
{% endset %} {{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: profiler_url, status: status|default('') }) }} {% endif %} {% endblock %} {% block menu %} {% set profiler_markup_version = profiler_markup_version|default(1) %} {% if profiler_markup_version == 1 %} PHPCR {{ collector.callcount }} {{ '%0.0f'|format(collector.time * 1000) }} ms {% else %} {{ include('@DoctrinePHPCR/Collector/icon.svg') }} PHPCR {% endif %} {% endblock %} {% block panel %}

Calls

{% for connection, calls in collector.calls %} {% if collector.connections|length > 1 %}

Connection {{ connection }}

{% endif %} {% if calls is empty %}

No calls.

{% else %} {% for i, call in calls %} {% endfor %}
# Time Info
{{ loop.index }} {{ '%0.2f'|format(call.executionMS * 1000) }} ms {{ call.method|raw }}
Parameters: {{ call.params|yaml_encode }}
Environment: {{ call.env|yaml_encode }}
{% if call.caller is defined %} Callers
    {% for caller in call.caller %}
  • - {{ caller }}
  • {% endfor %}
{% endif %}
{% endif %} {% endfor %}

Database Connections

{{ phpcr.key_value_table(collector.connections, "Name", "Service", "No connections") }}

Document Managers

{{ phpcr.key_value_table(collector.managers, "Name", "Service", "No document managers") }}

Document Mapping

{% for manager, classes in collector.documents %} {% if collector.managers|length > 1 %}

Manager {{ manager }}

{% endif %} {% if classes is empty %}

No loaded documents.

{% else %} {% for class in classes %} {% endfor %}
Class
{{ class }}
{% endif %} {% endfor %} {% endblock %} {# Display a flat associative array as an HTML table #} {% macro key_value_table(rows, key_label, value_label, empty_message) %} {% if rows %} {% for key, value in rows %} {% endfor %}
{{ key_label|default("Key")}} {{ value_label|default("Value")}}
{{ key }} {{ value }}
{% else %}

{{ empty_message|default("No data") }}.

{% endif %} {% endmacro %}