, Heimspiel GmbH * @package Vhs * @subpackage ViewHelpers\Render */ class UncacheViewHelper extends AbstractViewHelper { /** * Initialize * * @return void */ public function initializeArguments() { $this->registerArgument('partial', 'string', 'Reference to a partial.', TRUE); $this->registerArgument('section', 'string', 'Name of section inside the partial to render.', FALSE, NULL); $this->registerArgument('arguments', 'array', 'Arguments to pass to the partial.', FALSE, NULL); } /** * @return string */ public function render() { $partialArguments = $this->arguments['arguments']; if (FALSE === is_array($partialArguments)) { $partialArguments = array(); } if (FALSE === isset($partialArguments['settings']) && TRUE === $this->templateVariableContainer->exists('settings')) { $partialArguments['settings'] = $this->templateVariableContainer->get('settings'); } $substKey = 'INT_SCRIPT.' . $GLOBALS['TSFE']->uniqueHash(); $content = ''; $templateView = GeneralUtility::makeInstance('FluidTYPO3\\Vhs\\View\\UncacheTemplateView'); $GLOBALS['TSFE']->config['INTincScript'][$substKey] = array( 'type' => 'POSTUSERFUNC', 'cObj' => serialize($templateView), 'postUserFunc' => 'render', 'conf' => array( 'partial' => $this->arguments['partial'], 'section' => $this->arguments['section'], 'arguments' => $partialArguments, 'controllerContext' => $this->renderingContext->getControllerContext() ), 'content' => $content ); return $content; } }