Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[WebProfiler] Add info to the router panel
- Loading branch information
Showing
2 changed files
with
28 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 25 additions & 15 deletions
40
src/Symfony/Bundle/WebProfilerBundle/Resources/views/Router/panel.html.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,26 @@ | ||
<h2>Routing for "{{ pathinfo }}"</h2> | ||
<h2>Routing for "{{ request.pathinfo }}"</h2> | ||
|
||
<table class="routing"> | ||
<tr> | ||
<th>Route name</th> | ||
<th>Pattern</th> | ||
<th>Log</th> | ||
</tr> | ||
{% for trace in traces %} | ||
<tr class="{{ 1 == trace.level ? 'almost' : 2 == trace.level ? 'matches' : '' }}"> | ||
<td>{{ trace.name }}</td> | ||
<td>{{ trace.pattern }}</td> | ||
<td>{{ trace.log }}</td> | ||
</tr> | ||
{% endfor %} | ||
</table> | ||
<ul> | ||
<li><strong>Route: </strong>{{ request.route }}</li> | ||
<li> | ||
<strong>Route parameters:</strong> | ||
{% include 'WebProfilerBundle:Profiler:table.html.twig' with { 'data': request.routeParams } only %} | ||
</li> | ||
|
||
<li> | ||
<strong>Route matching:</strong> | ||
<table class="routing"> | ||
<tr> | ||
<th>Route name</th> | ||
<th>Pattern</th> | ||
<th>Log</th> | ||
</tr> | ||
{% for trace in traces %} | ||
<tr class="{{ 1 == trace.level ? 'almost' : 2 == trace.level ? 'matches' : '' }}"> | ||
<td>{{ trace.name }}</td> | ||
<td>{{ trace.pattern }}</td> | ||
<td>{{ trace.log }}</td> | ||
</tr> | ||
{% endfor %} | ||
</table> | ||
</li> |