diff options
| author | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2024-05-28 10:19:47 +0000 |
|---|---|---|
| committer | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2024-05-28 10:19:47 +0000 |
| commit | 387222b63ac0cc5daacf15969fdb7d50329e375b (patch) | |
| tree | 99cf9da6609246c6bf8edd0e044437244dc246fc /app/controllers/debugbar.php | |
| parent | 789a31471fdf6ec2e97c34a07d036533b4f83f47 (diff) | |
refine debugbar integration, re #4220
Merge request studip/studip!3050
Diffstat (limited to 'app/controllers/debugbar.php')
| -rw-r--r-- | app/controllers/debugbar.php | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/app/controllers/debugbar.php b/app/controllers/debugbar.php index a80000d..59627f2 100644 --- a/app/controllers/debugbar.php +++ b/app/controllers/debugbar.php @@ -1,17 +1,24 @@ <?php final class DebugbarController extends Trails_Controller { + public function __construct( + Trails\Dispatcher $dispatcher, + private readonly DebugBar\DebugBar $debugbar + ) { + parent::__construct($dispatcher); + } + public function css_action(): void { $this->set_content_type('text/css;charset=utf-8'); $this->render_nothing(); - app()->get(DebugBar\DebugBar::class)->getJavascriptRenderer()->dumpCssAssets(); + $this->debugbar->getJavascriptRenderer()->dumpCssAssets(); } public function js_action(): void { $this->set_content_type('text/javascript;charset=utf-8'); $this->render_nothing(); - app()->get(DebugBar\DebugBar::class)->getJavascriptRenderer()->setIncludeVendors(false)->dumpJsAssets(); + $this->debugbar->getJavascriptRenderer()->setIncludeVendors(false)->dumpJsAssets(); } } |
