‪TYPO3CMS  ‪main
TYPO3\CMS\Core\TypoScript\IncludeTree\Traverser\ConditionVerdictAwareIncludeTreeTraverser Class Reference
Inheritance diagram for TYPO3\CMS\Core\TypoScript\IncludeTree\Traverser\ConditionVerdictAwareIncludeTreeTraverser:
TYPO3\CMS\Core\TypoScript\IncludeTree\Traverser\IncludeTreeTraverserInterface

Public Member Functions

 traverse (RootInclude $rootInclude, array $visitors)
 

Private Member Functions

 traverseRecursive (IncludeInterface $include, array $visitors, int $currentDepth)
 

Detailed Description

An optimized traverser that does not traverse children when a node is a condition node that evaluate false.

This is pretty clever: When adding the ConditionMatcherVisitor as first visitor, it sets the condition verdict of a ConditionInterface node in visitBeforeChildren(). Adding the AstBuilderVisitor as second visitor, the AstBuilderVisitor will not be called for ConditionInterface children that did not evaluate to true. This way, we can both evaluate conditions and build the AST in only one traversing round.

: Internal tree structure.

Definition at line 37 of file ConditionVerdictAwareIncludeTreeTraverser.php.

Member Function Documentation

◆ traverse()

TYPO3\CMS\Core\TypoScript\IncludeTree\Traverser\ConditionVerdictAwareIncludeTreeTraverser::traverse ( RootInclude  $rootInclude,
array  $visitors 
)

◆ traverseRecursive()

TYPO3\CMS\Core\TypoScript\IncludeTree\Traverser\ConditionVerdictAwareIncludeTreeTraverser::traverseRecursive ( IncludeInterface  $include,
array  $visitors,
int  $currentDepth 
)
private