File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -117,7 +117,7 @@ public function beforeCompile()
117117
118118 if ($ this ->config ->debugger ?? $ builder ->getByType (Tracy \BlueScreen::class)) {
119119 $ builder ->getDefinition ($ this ->prefix ('application ' ))
120- ->addSetup ([Nette \ Bridges \ ApplicationTracy \RoutingPanel ::class, 'initializePanel ' ]);
120+ ->addSetup ([self ::class, 'initializeBlueScreenPanel ' ]);
121121 }
122122
123123 $ all = [];
@@ -199,4 +199,20 @@ private function findPresenters(): array
199199 }
200200 return $ presenters ;
201201 }
202+
203+
204+ /** @internal */
205+ public static function initializeBlueScreenPanel (
206+ Tracy \BlueScreen $ blueScreen ,
207+ Nette \Application \Application $ application
208+ ): void {
209+ $ blueScreen ->addPanel (function (?\Throwable $ e ) use ($ application , $ blueScreen ): ?array {
210+ $ dumper = $ blueScreen ->getDumper ();
211+ return $ e ? null : [
212+ 'tab ' => 'Nette Application ' ,
213+ 'panel ' => '<h3>Requests</h3> ' . $ dumper ($ application ->getRequests ())
214+ . '<h3>Presenter</h3> ' . $ dumper ($ application ->getPresenter ()),
215+ ];
216+ });
217+ }
202218}
Original file line number Diff line number Diff line change @@ -41,20 +41,6 @@ final class RoutingPanel implements Tracy\IBarPanel
4141 private $ source ;
4242
4343
44- public static function initializePanel (Nette \Application \Application $ application ): void
45- {
46- $ blueScreen = Tracy \Debugger::getBlueScreen ();
47- $ blueScreen ->addPanel (function (?\Throwable $ e ) use ($ application , $ blueScreen ): ?array {
48- $ dumper = $ blueScreen ->getDumper ();
49- return $ e ? null : [
50- 'tab ' => 'Nette Application ' ,
51- 'panel ' => '<h3>Requests</h3> ' . $ dumper ($ application ->getRequests ())
52- . '<h3>Presenter</h3> ' . $ dumper ($ application ->getPresenter ()),
53- ];
54- });
55- }
56-
57-
5844 public function __construct (
5945 Routing \Router $ router ,
6046 Nette \Http \IRequest $ httpRequest ,
You can’t perform that action at this time.
0 commit comments