[WebProfilerBundle] show the http method in wdt if not 'GET'
When the request method is different from 'GET', the wdt add a hint before the route name in the request panel.
This commit is contained in:
parent
4f020b5686
commit
0a0e8afa09
@ -27,7 +27,7 @@
|
|||||||
{% if collector.route %}
|
{% if collector.route %}
|
||||||
{% if collector.redirect %}{{ include('@WebProfiler/Icon/redirect.svg') }}{% endif %}
|
{% if collector.redirect %}{{ include('@WebProfiler/Icon/redirect.svg') }}{% endif %}
|
||||||
{% if collector.forward %}{{ include('@WebProfiler/Icon/forward.svg') }}{% endif %}
|
{% if collector.forward %}{{ include('@WebProfiler/Icon/forward.svg') }}{% endif %}
|
||||||
<span class="sf-toolbar-label">@</span>
|
<span class="sf-toolbar-label">{{ 'GET' != collector.method ? collector.method }} @</span>
|
||||||
<span class="sf-toolbar-value sf-toolbar-info-piece-additional">{{ collector.route }}</span>
|
<span class="sf-toolbar-value sf-toolbar-info-piece-additional">{{ collector.route }}</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endset %}
|
{% endset %}
|
||||||
@ -39,6 +39,13 @@
|
|||||||
<span>{{ collector.statuscode }} {{ collector.statustext }}</span>
|
<span>{{ collector.statuscode }} {{ collector.statustext }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{% if 'GET' != collector.method -%}
|
||||||
|
<div class="sf-toolbar-info-piece">
|
||||||
|
<b>Method</b>
|
||||||
|
<span>{{ collector.method }}</span>
|
||||||
|
</div>
|
||||||
|
{%- endif %}
|
||||||
|
|
||||||
<div class="sf-toolbar-info-piece">
|
<div class="sf-toolbar-info-piece">
|
||||||
<b>Controller</b>
|
<b>Controller</b>
|
||||||
<span>{{ request_handler }}</span>
|
<span>{{ request_handler }}</span>
|
||||||
|
@ -90,6 +90,7 @@ class RequestDataCollector extends DataCollector implements EventSubscriberInter
|
|||||||
$statusCode = $response->getStatusCode();
|
$statusCode = $response->getStatusCode();
|
||||||
|
|
||||||
$this->data = array(
|
$this->data = array(
|
||||||
|
'method' => $request->getMethod(),
|
||||||
'format' => $request->getRequestFormat(),
|
'format' => $request->getRequestFormat(),
|
||||||
'content' => $content,
|
'content' => $content,
|
||||||
'content_type' => $response->headers->get('Content-Type', 'text/html'),
|
'content_type' => $response->headers->get('Content-Type', 'text/html'),
|
||||||
@ -156,6 +157,11 @@ class RequestDataCollector extends DataCollector implements EventSubscriberInter
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getMethod()
|
||||||
|
{
|
||||||
|
return $this->data['method'];
|
||||||
|
}
|
||||||
|
|
||||||
public function getPathInfo()
|
public function getPathInfo()
|
||||||
{
|
{
|
||||||
return $this->data['path_info'];
|
return $this->data['path_info'];
|
||||||
|
Reference in New Issue
Block a user