diff --git a/Classes/Utility/PageRenderer.php b/Classes/Utility/PageRenderer.php new file mode 100644 index 0000000..f180ae4 --- /dev/null +++ b/Classes/Utility/PageRenderer.php @@ -0,0 +1,98 @@ + $this->getContextCode(), + 'section' => 1, + 'compress' => FALSE, + 'forceOnTop' => TRUE, + ]; + + $parent->addCssInlineBlock('BackendDebug', $this->getCssCode()); + } + + /** + * JavaScript Inline Code + * + * @return string + */ + protected function getContextCode() + { + $context = strtolower(GeneralUtility::getApplicationContext()); + $debug = $GLOBALS['TYPO3_CONF_VARS']['BE']['debug'] ? 'debug' : 'nodebug'; + $code = << \GeorgRinger\BackendDebug\Xclass\SelectSingleElement::class, ]; + + $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_pagerenderer.php']['render-preProcess'][] = 'GeorgRinger\BackendDebug\Utility\PageRenderer->setup'; }; $boot();