added back flashes into the request data collector (and in the web profiler)
This commit is contained in:
parent
e43e14987f
commit
1e79e30c7b
@ -103,6 +103,15 @@
|
||||
</p>
|
||||
{% endif %}
|
||||
|
||||
<h2>Flashes</h2>
|
||||
|
||||
{% if collector.flashes|length %}
|
||||
{% include 'WebProfilerBundle:Profiler:table.html.twig' with { 'data': collector.flashes } only %}
|
||||
{% else %}
|
||||
<p>
|
||||
<em>No flashes</em>
|
||||
</p>
|
||||
{% endif %}
|
||||
|
||||
{% if profile.parent %}
|
||||
<h2><a href="{{ path('_profiler', { 'token': profile.parent.token }) }}">Parent request: {{ profile.parent.token }}</a></h2>
|
||||
|
@ -72,6 +72,7 @@ class RequestDataCollector extends DataCollector
|
||||
'request_attributes' => $attributes,
|
||||
'response_headers' => $responseHeaders,
|
||||
'session_attributes' => $request->hasSession() ? $request->getSession()->all() : array(),
|
||||
'flashes' => $request->hasSession() ? $request->getSession()->getFlashBag()->all() : array(),
|
||||
'path_info' => $request->getPathInfo(),
|
||||
);
|
||||
}
|
||||
@ -121,6 +122,11 @@ class RequestDataCollector extends DataCollector
|
||||
return $this->data['session_attributes'];
|
||||
}
|
||||
|
||||
public function getFlashes()
|
||||
{
|
||||
return $this->data['flashes'];
|
||||
}
|
||||
|
||||
public function getContent()
|
||||
{
|
||||
return $this->data['content'];
|
||||
|
Reference in New Issue
Block a user