Guest User

Untitled

a guest
Mar 24th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. <?php
  2. namespace VENDOR\EXTENSION\ViewHelpers;
  3.  
  4. class DebugbarViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper
  5. {
  6.  
  7. /**
  8. * Displays the debug informationen in the PHP Debug Bar
  9. *
  10. * @param null $content
  11. */
  12. public function render($content = NULL)
  13. {
  14. if($content === NULL) {
  15. $content = $this->renderChildren();
  16. }
  17.  
  18. $currentApplicationContext = \TYPO3\CMS\Core\Utility\GeneralUtility::getApplicationContext();
  19.  
  20. if ($currentApplicationContext->isDevelopment()) {
  21. \Konafets\Typo3Debugbar\Overrides\DebuggerUtility::var_dump($content);
  22. }
  23.  
  24. return;
  25. }
  26. }
Add Comment
Please, Sign In to add comment