container->get(CacheManager::class); /** @var PhpFrontend $cache */ $cache = $cacheManager->getCache('typoscript'); $stringTreeBuilder = $this->container->get(StringTreeBuilder::class); $includeTree = $stringTreeBuilder->getTreeFromString($name, $typoScript, $this->tokenizer, $cache); $includeTreeTraverserConditionVerdictAware = new IncludeTreeTraverser(); $astBuilderVisitor = $this->container->get(IncludeTreeAstBuilderVisitor::class); $includeTreeTraverserConditionVerdictAware->traverse($includeTree, [$astBuilderVisitor]); return $astBuilderVisitor->getAst(); } /** * Parse a single string *not* supporting imports, conditions and caching. * Detail method used in install tool and in a couple of other special cases. * * @internal */ public function parseFromString(string $typoScript, AstBuilderInterface $astBuilder): RootNode { $lineStream = $this->tokenizer->tokenize($typoScript); return $astBuilder->build($lineStream, new RootNode()); } }