Skip to content

Commit

Permalink
bug #40791 [WebProfilerBundle] Use ControllerReference instead of URL…
Browse files Browse the repository at this point in the history
… 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
-------

f2ee8bc [WebProfiler] Use ControllerReference instead of URL in twig render()
  • Loading branch information
derrabus committed Apr 13, 2021
2 parents c3b4e81 + f2ee8bc commit ade71f0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Expand Up @@ -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 %}
Expand Down Expand Up @@ -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 %}
Expand Up @@ -10,5 +10,5 @@
{% endblock %}

{% block panel %}
{{ render(path('_profiler_router', { token: token })) }}
{{ render(controller('web_profiler.controller.router::panelAction', { token: token })) }}
{% endblock %}
Expand Up @@ -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>

Expand Down

0 comments on commit ade71f0

Please sign in to comment.