diff --git a/Resources/config/phpcr.xml b/Resources/config/phpcr.xml
index 119efa08..717c5cca 100644
--- a/Resources/config/phpcr.xml
+++ b/Resources/config/phpcr.xml
@@ -51,7 +51,7 @@
-
+
diff --git a/Resources/views/Collector/icon.svg b/Resources/views/Collector/icon.svg
new file mode 100644
index 00000000..b5d59d6f
--- /dev/null
+++ b/Resources/views/Collector/icon.svg
@@ -0,0 +1,4 @@
+
+
+
diff --git a/Resources/views/Collector/phpcr.html.twig b/Resources/views/Collector/phpcr.html.twig
index c031adfe..a0c5c49e 100644
--- a/Resources/views/Collector/phpcr.html.twig
+++ b/Resources/views/Collector/phpcr.html.twig
@@ -1,50 +1,77 @@
{% extends 'WebProfilerBundle:Profiler:layout.html.twig' %}
{% block toolbar %}
+ {% set profiler_markup_version = profiler_markup_version|default(1) %}
+
{% set icon %}
-
- {{ collector.callcount }}
- {% if collector.callcount > 0 %}
- in {{ '%0.2f'|format(collector.time * 1000) }} ms
+ {% if profiler_markup_version == 1 %}
+
+ {{ collector.callcount }}
+ {% if collector.callcount > 0 %}
+ in {{ '%0.2f'|format(collector.time * 1000) }} ms
+ {% endif %}
+ {% else %}
+ {% if collector.callcount > 0 %}
+ {% set status = collector.callcount > 50 ? 'yellow' %}
+
+ {{ include('@DoctrinePHPCR/Collector/icon.svg') }}
+
+ {{ collector.callcount }}
+
+ in
+ {{ '%0.2f'|format(collector.time * 1000) }}
+ ms
+
+ {% endif %}
{% endif %}
{% endset %}
+
{% set text %}
PHPCR Calls
- {{ collector.callcount }}
+ {{ collector.callcount }}
Call time
{{ '%0.2f'|format(collector.time * 1000) }} ms
{% endset %}
- {% include 'WebProfilerBundle:Profiler:toolbar_item.html.twig' with { 'link': profiler_url } %}
+
+ {{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: profiler_url, status: status|default('') }) }}
{% endblock %}
{% block menu %}
-
-
- PHPCR
-
- {{ collector.callcount }}
- {{ '%0.0f'|format(collector.time * 1000) }} ms
-
-
+ {% 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 %}
- {{ block('calls') }}
-{% endblock %}
-
-{% block calls %}
Calls
{% for connection, calls in collector.calls %}
- Connection {{ connection }}
+ {% if collector.connections|length > 1 %}
+ Connection {{ connection }}
+ {% endif %}
+
{% if calls is empty %}
-
- No calls.
-
+
{% else %}
@@ -58,19 +85,22 @@
{% for i, call in calls %}
{{ loop.index }}
- {{ '%0.2f'|format(call.executionMS * 1000) }} ms
+ {{ '%0.2f'|format(call.executionMS * 1000) }} ms
-
- {{ call.method|raw }}
-
-
- Method : {{ call.method|yaml_encode }}
- Parameters : {{ call.params|yaml_encode }}
- Environment : {{ call.env|yaml_encode }}
- {% if call.caller is defined %}
- Callers {% for caller in call.caller %} - {{ caller }} {% endfor %}
- {% endif %}
-
+ {{ 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 %}
{% endfor %}
@@ -84,9 +114,9 @@
{% if collector.connections %}
{% include 'WebProfilerBundle:Profiler:table.html.twig' with {data: collector.connections} only %}
{% else %}
-
- No connections.
-
+
{% endif %}
Document Managers
@@ -94,24 +124,30 @@
{% if collector.managers %}
{% include 'WebProfilerBundle:Profiler:table.html.twig' with {data: collector.managers} only %}
{% else %}
-
- No document managers.
-
+
+
No document managers.
+
{% endif %}
- Mapping
+ Document Mapping
{% for manager, classes in collector.documents %}
- Manager {{ manager }}
+ {% if collector.managers|length > 1 %}
+ Manager {{ manager }}
+ {% endif %}
+
{% if classes is empty %}
- No loaded documents.
+
{% else %}
-
- Class
-
+
+ Class
+
+
{% for class in classes %}
@@ -122,133 +158,4 @@
{% endif %}
{% endfor %}
-
-
-
-
{% endblock %}