Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 731690f

Browse files
committed
feature #25164 [WebProfilerBundle] Improve controller linking (ro0NL)
This PR was merged into the 4.1-dev branch. Discussion ---------- [WebProfilerBundle] Improve controller linking | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes/no | Fixed tickets | #... <!-- #-prefixed issue number(s), if any --> | License | MIT | Doc PR | symfony/symfony-docs#... <!--highly recommended for new features--> I propose to remove the `Controller class` entry from the request toolbar panel, IMHO it's confusing/useless compared to the linked `Controller` entry above. They represent the same. To preserve its value it's now used as title attribute instead, favored over controller file currently being used here. We can read that from the statusbar anyway :-) Before: (hovering ontroller link) ![image](https://user-images.githubusercontent.com/1047696/35796142-ce6cdff4-0a5b-11e8-9fa3-91897516c9fc.png) After: (hovering ontroller link) ![image](https://user-images.githubusercontent.com/1047696/35796237-2855e556-0a5c-11e8-8dca-853c3eabd2e9.png) Commits ------- f6c0dc6 [WebProfilerBundle] Improve controller linking
2 parents 5f0c279 + f6c0dc6 commit 731690f

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/request.html.twig

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,6 @@
4949
<span>{{ request_handler }}</span>
5050
</div>
5151

52-
{% if collector.controller.class is defined -%}
53-
<div class="sf-toolbar-info-piece">
54-
<b>Controller class</b>
55-
<span>{{ collector.controller.class }}</span>
56-
</div>
57-
{%- endif %}
58-
5952
<div class="sf-toolbar-info-piece">
6053
<b>Route name</b>
6154
<span>{{ collector.route|default('NONE') }}</span>
@@ -297,7 +290,7 @@
297290
{% if controller.class is defined -%}
298291
{%- if method|default(false) %}<span class="sf-toolbar-status sf-toolbar-redirection-method">{{ method }}</span>{% endif -%}
299292
{%- set link = controller.file|file_link(controller.line) %}
300-
{%- if link %}<a href="{{ link }}" title="{{ controller.file }}">{% else %}<span>{% endif %}
293+
{%- if link %}<a href="{{ link }}" title="{{ controller.class }}">{% else %}<span title="{{ controller.class }}">{% endif %}
301294

302295
{%- if route|default(false) -%}
303296
@{{ route }}

0 commit comments

Comments
 (0)