[WebProfilerBundle] replaced usage of the render tag by the render function (to decouple the bundle from TwigBundle)
This commit is contained in:
parent
0e2418c505
commit
00e08be05b
@ -166,11 +166,10 @@ class ProfilerController
|
||||
*
|
||||
* @param Request $request The current HTTP Request
|
||||
* @param string $token The profiler token
|
||||
* @param string $position The toolbar position (top, bottom, normal, or null -- use the configuration)
|
||||
*
|
||||
* @return Response A Response instance
|
||||
*/
|
||||
public function toolbarAction(Request $request, $token, $position = null)
|
||||
public function toolbarAction(Request $request, $token)
|
||||
{
|
||||
$session = $request->getSession();
|
||||
|
||||
@ -189,7 +188,8 @@ class ProfilerController
|
||||
return new Response();
|
||||
}
|
||||
|
||||
if (null === $position) {
|
||||
// the toolbar position (top, bottom, normal, or null -- use the configuration)
|
||||
if (null === $position = $request->query->get('position')) {
|
||||
$position = $this->toolbarPosition;
|
||||
}
|
||||
|
||||
|
@ -8,6 +8,10 @@
|
||||
<default key="_controller">web_profiler.controller.profiler:searchAction</default>
|
||||
</route>
|
||||
|
||||
<route id="_profiler_search_bar" pattern="/search_bar">
|
||||
<default key="_controller">web_profiler.controller.profiler:searchBarAction</default>
|
||||
</route>
|
||||
|
||||
<route id="_profiler_purge" pattern="/purge">
|
||||
<default key="_controller">web_profiler.controller.profiler:purgeAction</default>
|
||||
</route>
|
||||
@ -36,6 +40,18 @@
|
||||
<default key="_controller">web_profiler.controller.profiler:panelAction</default>
|
||||
</route>
|
||||
|
||||
<route id="_profiler_router" pattern="/{token}/router">
|
||||
<default key="_controller">web_profiler.controller.router:panelAction</default>
|
||||
</route>
|
||||
|
||||
<route id="_profiler_exception" pattern="/{token}/exception">
|
||||
<default key="_controller">web_profiler.controller.exception:showAction</default>
|
||||
</route>
|
||||
|
||||
<route id="_profiler_exception_css" pattern="/{token}/exception.css">
|
||||
<default key="_controller">web_profiler.controller.exception:cssAction</default>
|
||||
</route>
|
||||
|
||||
<route id="_profiler_redirect" pattern="/">
|
||||
<default key="_controller">FrameworkBundle:Redirect:redirect</default>
|
||||
<default key="route">_profiler_search_results</default>
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
{% block head %}
|
||||
<style type="text/css">
|
||||
{% render 'web_profiler.controller.exception:cssAction' with { 'token': token } %}
|
||||
{{ render(path('_profiler_exception_css', { 'token': token })) }}
|
||||
</style>
|
||||
{{ parent() }}
|
||||
{% endblock %}
|
||||
@ -28,7 +28,7 @@
|
||||
</p>
|
||||
{% else %}
|
||||
<div class="sf-reset">
|
||||
{% render 'web_profiler.controller.exception:showAction' with { 'token': token } %}
|
||||
{{ render(path('_profiler_exception', { 'token': token })) }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
@ -11,5 +11,5 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block panel %}
|
||||
{% render "web_profiler.controller.router:panelAction" with {'token': token} %}
|
||||
{{ render(path('_profiler_router', {'token': token})) }}
|
||||
{% endblock %}
|
||||
|
@ -34,7 +34,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div id="navigation">
|
||||
{% render 'web_profiler.controller.profiler:searchBarAction' %}
|
||||
{{ render(path('_profiler_search_bar')) }}
|
||||
{% include '@WebProfiler/Profiler/admin.html.twig' with { 'token': '' } only %}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
{% block body %}
|
||||
|
||||
{% render 'web_profiler.controller.profiler:toolbarAction' with { 'token': token, 'position': 'normal' } %}
|
||||
{{ render(path('_wdt', { 'token': token, 'position': 'normal' })) }}
|
||||
|
||||
<div id="content">
|
||||
{% include '@WebProfiler/Profiler/header.html.twig' only %}
|
||||
@ -53,7 +53,7 @@
|
||||
</li>
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% render 'web_profiler.controller.profiler:searchBarAction' %}
|
||||
{{ render(path('_profiler_search_bar')) }}
|
||||
{% include '@WebProfiler/Profiler/admin.html.twig' with { 'token': token } only %}
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user