‪TYPO3CMS  ‪main
TYPO3\CMS\Core\TypoScript\IncludeTree\StringTreeBuilder Class Reference

Public Member Functions

 __construct (private readonly TreeFromLineStreamBuilder $treeFromTokenStreamBuilder,)
 
 getTreeFromString (string $name, string $typoScriptString, TokenizerInterface $tokenizer, ?PhpFrontend $cache=null,)
 

Private Member Functions

 prepareTreeForCache (RootInclude $node)
 

Detailed Description

Parse a single TypoScript string, supporting imports and conditions.

This is a relatively simple "tree" builder: It gets a single TypoScript string snippet, tokenizes it and creates a RootInclude "tree". The string is scanned for imports and conditions: Those create sub includes, just like the other TreeBuilder classes do.

Definition at line 35 of file StringTreeBuilder.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Core\TypoScript\IncludeTree\StringTreeBuilder::__construct ( private readonly TreeFromLineStreamBuilder  $treeFromTokenStreamBuilder)

Definition at line 37 of file StringTreeBuilder.php.

Member Function Documentation

◆ getTreeFromString()

TYPO3\CMS\Core\TypoScript\IncludeTree\StringTreeBuilder::getTreeFromString ( string  $name,
string  $typoScriptString,
TokenizerInterface  $tokenizer,
?PhpFrontend  $cache = null 
)

Create tree, ready to be traversed. Will cache if $cache is not null.

Parameters
non-empty-string$name‪A name used as cache identifier, [a-z,A-Z,-] only

Definition at line 46 of file StringTreeBuilder.php.

References TYPO3\CMS\Webhooks\Message\$identifier, TYPO3\CMS\Core\TypoScript\IncludeTree\StringTreeBuilder\prepareTreeForCache(), and TYPO3\CMS\Core\TypoScript\Tokenizer\TokenizerInterface\tokenize().

◆ prepareTreeForCache()

TYPO3\CMS\Core\TypoScript\IncludeTree\StringTreeBuilder::prepareTreeForCache ( RootInclude  $node)
private