/** * Get a StandaloneView used for rendering the component * * @return \Neos\FluidAdaptor\View\StandaloneView */ protected function getView() { $view = new \Neos\FluidAdaptor\View\StandaloneView($this->controllerContext->getRequest()); if (is_file($this->settings['viewHelpers']['templates'][get_class($this)])) { $view->setPartialRootPath($this->settings['viewHelpers']['partialRootPath']); $view->setTemplatePathAndFilename($this->settings['viewHelpers']['templates'][get_class($this)]); } return $view; }
/** * @param string $templatePathAndFilename Path and filename of the template to render * @param array $arguments Arguments to assign to the template before rendering * @return string */ public function render($templatePathAndFilename, $arguments = array()) { $standaloneView = new \Neos\FluidAdaptor\View\StandaloneView($this->controllerContext->getRequest()); $standaloneView->setTemplatePathAndFilename($templatePathAndFilename); return $standaloneView->assignMultiple($arguments)->render(); }