/** * @param string $templateFile template name (UpperCamelCase) * @param mixed $data variables to be passed to the Fluid view * * @return string */ protected function getStandAloneTemplate($templateFile, $data) { /** @var \TYPO3\CMS\Fluid\View\StandaloneView $view */ $view = $this->objectManager->get(\TYPO3\CMS\Fluid\View\StandaloneView::class); $templatePathAndFilename = $templateFile; $view->setTemplatePathAndFilename($templatePathAndFilename); $view->setControllerContext($this->controllerContext); $view->assign('data', $data); $view->setFormat('html'); return \Ecom\EcomToolbox\Utility\Div::sanitize_output($view->render()); }