create()` instead */ public function __construct( ViewHelperResolver $viewHelperResolver, FluidCacheInterface $cache, array $templateProcessors, array $expressionNodeTypes, TemplatePaths $templatePaths, ArgumentProcessorInterface $argumentProcessor ) { // Partially cloning parent::__construct() but with custom implementations. $this->setTemplateParser(new TemplateParser()); $this->setTemplateCompiler(new TemplateCompiler()); $this->setViewHelperInvoker(new ViewHelperInvoker()); $this->setArgumentProcessor($argumentProcessor); $this->setViewHelperVariableContainer(new ViewHelperVariableContainer()); $this->setVariableProvider(new StandardVariableProvider()); $this->setTemplateProcessors($templateProcessors); $this->setExpressionNodeTypes($expressionNodeTypes); $this->setTemplatePaths($templatePaths); $this->setViewHelperResolver($viewHelperResolver); $this->setCache($cache); } /** * Build parser configuration. Adds custom fluid interceptors from configuration. * * @throws \InvalidArgumentException if a class not implementing InterceptorInterface was registered */ public function buildParserConfiguration(): Configuration { $parserConfiguration = parent::buildParserConfiguration(); foreach ($GLOBALS['TYPO3_CONF_VARS']['SYS']['fluid']['interceptors'] as $className) { $interceptor = GeneralUtility::makeInstance($className); if (!$interceptor instanceof InterceptorInterface) { throw new \InvalidArgumentException( 'Interceptor "' . $className . '" needs to implement ' . InterceptorInterface::class . '.', 1462869795 ); } $parserConfiguration->addInterceptor($interceptor); } return $parserConfiguration; } /** * @param string $action */ public function setControllerAction($action): void { $dotPosition = strpos($action, '.'); if ($dotPosition !== false) { $action = substr($action, 0, $dotPosition); } $this->controllerAction = $action; } /** * @param string $controllerName */ public function setControllerName($controllerName): void { $this->controllerName = $controllerName; } public function getControllerName(): string { return $this->controllerName; } public function getControllerAction(): string { return $this->controllerAction; } }