diff --git a/frosting.json b/frosting.json new file mode 100644 index 0000000..23d8293 --- /dev/null +++ b/frosting.json @@ -0,0 +1,20 @@ +{ + "services": { + "debugBar": { + "class": "DebugBar\\StandardDebugBar" + }, + "debugBarRenderer": { + "class": "DebugBar\\Renderer\\JavascriptRenderer", + "configuration": { + "baseUrl": "/frosting/asset/debugBar" + } + }, + "assetCopier": { + "configuration": { + "toMirror": { + "debugBar": {"source":""} + } + } + } + } +} diff --git a/src/DebugBar/Renderer/JavascriptRenderer.php b/src/DebugBar/Renderer/JavascriptRenderer.php index 02178c5..07e3556 100644 --- a/src/DebugBar/Renderer/JavascriptRenderer.php +++ b/src/DebugBar/Renderer/JavascriptRenderer.php @@ -26,6 +26,12 @@ class JavascriptRenderer protected $toolbarVariableName = 'phpdebugbar'; + /** + * @param \DebugBar\DebugBar $debugBar + * @param string $baseUrl + * + * @Inject(debugBar="debugBar", baseUrl="$[debugBarRenderer][baseUrl]") + */ public function __construct(DebugBar $debugBar, $baseUrl = '/') { $this->debugBar = $debugBar;