merged branch vicb/misc/cleaning (PR #3280)
Commits
-------
3896fdd
[WebProfilerBundle] Some cleanup
Discussion
----------
[WebProfilerBundle] Some cleanup
former #3206 part 1 (misc cleanup)
This commit is contained in:
commit
75c6ccf3b6
@ -37,7 +37,6 @@ class RequestDataCollector extends BaseRequestDataCollector
|
||||
{
|
||||
parent::collect($request, $response, $exception);
|
||||
|
||||
$this->data['route'] = $request->attributes->get('_route');
|
||||
$this->data['controller'] = 'n/a';
|
||||
|
||||
if (isset($this->controllers[$request])) {
|
||||
@ -71,7 +70,17 @@ class RequestDataCollector extends BaseRequestDataCollector
|
||||
*/
|
||||
public function getRoute()
|
||||
{
|
||||
return $this->data['route'];
|
||||
return $this->data['request_attributes']['_route'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the route parameters.
|
||||
*
|
||||
* @return array The parameters
|
||||
*/
|
||||
public function getRouteParams()
|
||||
{
|
||||
return $this->data['request_attributes']['_route_params'];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -96,23 +96,7 @@
|
||||
<h2>Session Attributes</h2>
|
||||
|
||||
{% if collector.sessionattributes|length %}
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">Key</th>
|
||||
<th scope="col">Value</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% set attributes = collector.sessionattributes %}
|
||||
{% for key in attributes|keys|sort %}
|
||||
<tr>
|
||||
<th>{{ key }}</th>
|
||||
<td>{{ attributes[key]|yaml_dump }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% include 'WebProfilerBundle:Profiler:table.html.twig' with { 'data': collector.sessionattributes } only %}
|
||||
{% else %}
|
||||
<p>
|
||||
<em>No session attributes</em>
|
||||
|
@ -1,16 +1,16 @@
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">Key</th>
|
||||
<th scope="col">Value</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for key in bag.keys|sort %}
|
||||
<table {% if class is defined %}class='{{ class }}'{% endif %} >
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">Key</th>
|
||||
<th scope="col">Value</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for key in bag.keys|sort %}
|
||||
<tr>
|
||||
<th>{{ key }}</th>
|
||||
<td>{{ bag.get(key)|yaml_dump }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
@ -0,0 +1,16 @@
|
||||
<table {% if class is defined %}class='{{ class }}'{% endif %} >
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">Key</th>
|
||||
<th scope="col">Value</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for key in data|keys|sort %}
|
||||
<tr>
|
||||
<th>{{ key }}</th>
|
||||
<td>{{ data[key]|yaml_dump }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
@ -14,3 +14,5 @@
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
<em><small>Note: The above matching is based on the configuration for the current router which might differ from
|
||||
the configuration used while routing this request.</small></em>
|
Reference in New Issue
Block a user