{testVariables.array} * * foobarbazfoo * * All Features * ------------ * * :: * * * {blogs} * * * [A HTML view of the var_dump] */ class DebugViewHelper extends AbstractViewHelper { use CompileWithRenderStatic; /** * This prevents double escaping as the output is encoded in DebuggerUtility::var_dump * * @var bool */ protected $escapeChildren = false; /** * Output of this viewhelper is already escaped * * @var bool */ protected $escapeOutput = false; /** * Initialize arguments. * * @throws \TYPO3Fluid\Fluid\Core\ViewHelper\Exception */ public function initializeArguments() { $this->registerArgument('title', 'string', 'optional custom title for the debug output'); $this->registerArgument('maxDepth', 'int', 'Sets the max recursion depth of the dump (defaults to 8). De- or increase the number according to your needs and memory limit.', false, 8); $this->registerArgument('plainText', 'bool', 'If TRUE, the dump is in plain text, if FALSE the debug output is in HTML format.', false, false); $this->registerArgument('ansiColors', 'bool', 'If TRUE, ANSI color codes is added to the plaintext output, if FALSE (default) the plaintext debug output not colored.', false, false); $this->registerArgument('inline', 'bool', 'if TRUE, the dump is rendered at the position of the tag. If FALSE (default), the dump is displayed at the top of the page.', false, false); $this->registerArgument('blacklistedClassNames', 'array', 'An array of class names (RegEx) to be filtered. Default is an array of some common class names.'); $this->registerArgument('blacklistedPropertyNames', 'array', 'An array of property names and/or array keys (RegEx) to be filtered. Default is an array of some common property names.'); } /** * A wrapper for \TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump(). * * @param array $arguments * @param \Closure $renderChildrenClosure * @param RenderingContextInterface $renderingContext * * @return string */ public static function renderStatic(array $arguments, \Closure $renderChildrenClosure, RenderingContextInterface $renderingContext) { return DebuggerUtility::var_dump($renderChildrenClosure(), $arguments['title'], $arguments['maxDepth'], (bool)$arguments['plainText'], (bool)$arguments['ansiColors'], (bool)$arguments['inline'], $arguments['blacklistedClassNames'], $arguments['blacklistedPropertyNames']); } }