Last active
March 16, 2018 14:48
-
-
Save KaffDaddy/cfedfdba113fa09493c6bc32a2de75f2 to your computer and use it in GitHub Desktop.
Fluid-ViewHelper for https://github.com/Konafets/typo3_debugbar
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace VENDOR\EXTENSION\ViewHelpers; | |
class DebugbarViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper | |
{ | |
/** | |
* Displays the debug informationen in the PHP Debug Bar | |
* | |
* @param null $content | |
*/ | |
public function render($content = NULL) | |
{ | |
if($content === NULL) { | |
$content = $this->renderChildren(); | |
} | |
$currentApplicationContext = \TYPO3\CMS\Core\Utility\GeneralUtility::getApplicationContext(); | |
if ($currentApplicationContext->isDevelopment()) { | |
\Konafets\Typo3Debugbar\Overrides\DebuggerUtility::var_dump($content); | |
} | |
return; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment