File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -120,7 +120,7 @@ public function beforeCompile()
120120
121121 if ($ this ->config ->debugger ?? $ builder ->getByType (Tracy \BlueScreen::class)) {
122122 $ builder ->getDefinition ($ this ->prefix ('application ' ))
123- ->addSetup ([Nette \ Bridges \ ApplicationTracy \RoutingPanel ::class, 'initializePanel ' ]);
123+ ->addSetup ([self ::class, 'initializeBlueScreenPanel ' ]);
124124 }
125125
126126 $ all = [];
@@ -202,4 +202,20 @@ private function findPresenters(): array
202202 }
203203 return $ presenters ;
204204 }
205+
206+
207+ /** @internal */
208+ public static function initializeBlueScreenPanel (
209+ Tracy \BlueScreen $ blueScreen ,
210+ Nette \Application \Application $ application
211+ ): void {
212+ $ blueScreen ->addPanel (function (?\Throwable $ e ) use ($ application , $ blueScreen ): ?array {
213+ $ dumper = $ blueScreen ->getDumper ();
214+ return $ e ? null : [
215+ 'tab ' => 'Nette Application ' ,
216+ 'panel ' => '<h3>Requests</h3> ' . $ dumper ($ application ->getRequests ())
217+ . '<h3>Presenter</h3> ' . $ dumper ($ application ->getPresenter ()),
218+ ];
219+ });
220+ }
205221}
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