/** * Inject an view object to be able to set templateRootPath from flexform * * @param \TYPO3\CMS\Extbase\Mvc\View\ViewInterface $view * @return void */ protected function initializeView(\TYPO3\CMS\Extbase\Mvc\View\ViewInterface $view) { if (isset($this->settings['templateRootPath']) && !empty($this->settings['templateRootPath'])) { $templateRootPath = \TYPO3\CMS\Core\Utility\GeneralUtility::getFileAbsFileName($this->settings['templateRootPath'], true); if (\TYPO3\CMS\Core\Utility\GeneralUtility::isAllowedAbsPath($templateRootPath)) { $this->view->setTemplateRootPaths(array($templateRootPath)); } } }