bug #40791 [WebProfilerBundle] Use ControllerReference instead of URL in twig render() (Foxprodev)

This PR was merged into the 5.2 branch.

Discussion
----------

[WebProfilerBundle] Use ControllerReference instead of URL in twig render()

| Q             | A
| ------------- | ---
| Branch?       | 5.2
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #40709
| License       | MIT
| Doc PR        |

Use `ControllerReference` instead of `UrlGenerator`'s URL. Helps to deal with different baseUrl

Feel free to help me with some advice. Thank you in advance

Commits
-------

f2ee8bc7ae [WebProfiler] Use ControllerReference instead of URL in twig render()
This commit is contained in:
Alexander M. Turek 2021-04-13 16:13:45 +02:00
commit ade71f0404
3 changed files with 4 additions and 4 deletions

View File

@ -3,7 +3,7 @@
{% block head %}
{% if collector.hasexception %}
<style>
{{ render(path('_profiler_exception_css', { token: token })) }}
{{ render(controller('web_profiler.controller.exception_panel::stylesheet', { token: token })) }}
{{ include('@WebProfiler/Collector/exception.css.twig') }}
</style>
{% endif %}
@ -31,7 +31,7 @@
</div>
{% else %}
<div class="sf-reset">
{{ render(path('_profiler_exception', { token: token })) }}
{{ render(controller('web_profiler.controller.exception_panel::body', { token: token })) }}
</div>
{% endif %}
{% endblock %}

View File

@ -10,5 +10,5 @@
{% endblock %}
{% block panel %}
{{ render(path('_profiler_router', { token: token })) }}
{{ render(controller('web_profiler.controller.router::panelAction', { token: token })) }}
{% endblock %}

View File

@ -108,7 +108,7 @@
{{ include('@WebProfiler/Icon/search.svg') }} <span class="hidden-small">Search</span>
</a>
{{ render(path('_profiler_search_bar', request.query.all)) }}
{{ render(controller('web_profiler.controller.profiler::searchBarAction', request.query.all)) }}
</div>
</div>