Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

108 lines (98 sloc) 3.936 kb
{% extends 'WebProfilerBundle:Profiler:layout.html.twig' %}
{% block toolbar %}
{% set icon %}
<img width="20" height="28" alt="Database" style="border-width: 0; vertical-align: middle; margin-right: 5px;" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAcCAYAAABh2p9gAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAQRJREFUeNpi/P//PwM1ARMDlcGogZQDlpMnT7pxc3NbA9nhQKxOpL5rQLwJiPeBsI6Ozl+YBOOOHTv+AOllQNwtLS39F2owKYZ/gRq8G4i3ggxEToggWzvc3d2Pk+1lNL4fFAs6ODi8JzdS7mMRVyDVoAMHDsANdAPiOCC+jCQvQKqBQB/BDbwBxK5AHA3E/kB8nKJkA8TMQBwLxaBIKQbi70AvTADSBiSadwFXpCikpKQU8PDwkGTaly9fHFigkaKIJid4584dkiMFFI6jkTJII0WVmpHCAixZQEXWYhDeuXMnyLsVlEQKI45qFBQZ8eRECi4DBaAlDqle/8A48ip6gAADANdQY88Uc0oGAAAAAElFTkSuQmCC"/>
{% endset %}
{% set text %}
<span title="{{ '%0.2f'|format(collector.time * 1000) }} ms">{{ collector.querycount }}</span>
{% endset %}
{% include 'WebProfilerBundle:Profiler:toolbar_item.html.twig' with { 'link': profiler_url } %}
{% endblock %}
{% block menu %}
<span class="label">
<span class="icon"><img src="{{ asset('bundles/webprofiler/images/profiler/db.png') }}" alt="" /></span>
<strong>Doctrine</strong>
<span class="count">
<span>{{ collector.querycount }}</span>
<span>{{ '%0.0f'|format(collector.time * 1000) }} ms</span>
</span>
</span>
{% endblock %}
{% block panel %}
{% if app.request.query.has('connection') and app.request.query.has('query') %}
{% render 'DoctrineBundle:Profiler:explain' with {
'token': token,
'panel': 'db',
'connectionName': app.request.query.get('connection'),
'query': app.request.query.get('query')
} %}
{% else %}
{{ block('queries') }}
{% endif %}
{% endblock %}
{% block queries %}
<h2>Queries</h2>
{% for connection, queries in collector.queries %}
<h3>Connection <em>{{ connection }}</em></h3>
{% if queries is empty %}
<p>
<em>No queries.</em>
</p>
{% else %}
<ul class="alt">
{% for i, query in queries %}
<li class="{{ i is odd ? 'odd' : 'even' }}">
<div>
<code>{{ query.sql }}</code>
</div>
<small>
<strong>Parameters</strong>: {{ query.params|yaml_encode }}<br />
<strong>Time</strong>: {{ '%0.2f'|format(query.executionMS * 1000) }} ms
</small>
{% if query.explainable %}
<a href="{{ path('_profiler', {'panel': 'db', 'token': token, 'connection': connection, 'query': i}) }}">Explain the query</a>
{% endif %}
</li>
{% endfor %}
</ul>
{% endif %}
{% endfor %}
<h2>Database Connections</h2>
{% if collector.connections %}
<table>
<tr>
<th>Name</th>
<th>Service</th>
</tr>
{% for name, service in collector.connections %}
<tr>
<th>{{ name }}</th>
<td>{{ service }}</td>
</tr>
{% endfor %}
</table>
{% else %}
<p>
<em>No connections.</em>
</p>
{% endif %}
<h2>Entity Managers</h2>
{% if collector.managers %}
<table>
<tr>
<th>Name</th>
<th>Service</th>
</tr>
{% for name, service in collector.managers %}
<tr>
<th>{{ name }}</th>
<td>{{ service }}</td>
</tr>
{% endfor %}
</table>
{% else %}
<p>
<em>No entity managers.</em>
</p>
{% endif %}
{% endblock %}
Jump to Line
Something went wrong with that request. Please try again.