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);
|
parent::collect($request, $response, $exception);
|
||||||
|
|
||||||
$this->data['route'] = $request->attributes->get('_route');
|
|
||||||
$this->data['controller'] = 'n/a';
|
$this->data['controller'] = 'n/a';
|
||||||
|
|
||||||
if (isset($this->controllers[$request])) {
|
if (isset($this->controllers[$request])) {
|
||||||
@ -71,7 +70,17 @@ class RequestDataCollector extends BaseRequestDataCollector
|
|||||||
*/
|
*/
|
||||||
public function getRoute()
|
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>
|
<h2>Session Attributes</h2>
|
||||||
|
|
||||||
{% if collector.sessionattributes|length %}
|
{% if collector.sessionattributes|length %}
|
||||||
<table>
|
{% include 'WebProfilerBundle:Profiler:table.html.twig' with { 'data': collector.sessionattributes } only %}
|
||||||
<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>
|
|
||||||
{% else %}
|
{% else %}
|
||||||
<p>
|
<p>
|
||||||
<em>No session attributes</em>
|
<em>No session attributes</em>
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
<table>
|
<table {% if class is defined %}class='{{ class }}'{% endif %} >
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="col">Key</th>
|
<th scope="col">Key</th>
|
||||||
<th scope="col">Value</th>
|
<th scope="col">Value</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for key in bag.keys|sort %}
|
{% for key in bag.keys|sort %}
|
||||||
<tr>
|
<tr>
|
||||||
<th>{{ key }}</th>
|
<th>{{ key }}</th>
|
||||||
<td>{{ bag.get(key)|yaml_dump }}</td>
|
<td>{{ bag.get(key)|yaml_dump }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</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>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</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