IncludeTreeConditionMatcherVisitor implements IncludeTreeVisitorInterface, LoggerAwareInterface uses LoggerAwareTrait

FinalYes

A visitor that looks at IncludeConditionInterface nodes and evaluates their conditions.

Condition matching is done in visitBeforeChildren() to be used in combination with ConditionVerdictAwareIncludeTreeTraverser, so children are only traversed for conditions that evaluated true.

Tags
internal:

Internal tree structure.

Attributes
#[Autoconfigure]
$public: true
$shared: false

Table of Contents

Interfaces

IncludeTreeVisitorInterface
A visitor that can be attached to IncludeTreeTraverser's.
LoggerAwareInterface

Methods

__construct()  : mixed
getConditionListWithVerdicts()  : array<string|int, mixed>
A list of all handled conditions with their verdicts.
initializeExpressionMatcherWithVariables()  : void
Prepare the core expression language Resolver class - our API to symfony expression language - for typoscript context usage.
visit()  : void
Main visit method called for each node.
visitBeforeChildren()  : void
Let symfony expression language handle the expression, gather expressions that have been handled since they influence page caching, negate expression verdicts if they're a [else] expression.

Methods

getConditionListWithVerdicts()

A list of all handled conditions with their verdicts.

public getConditionListWithVerdicts() : array<string|int, mixed>

This is used in FE since condition verdicts influence page caches.

Return values
array<string|int, mixed>

initializeExpressionMatcherWithVariables()

Prepare the core expression language Resolver class - our API to symfony expression language - for typoscript context usage.

public initializeExpressionMatcherWithVariables(array<string|int, mixed> $variables) : void

The method gets a series of variables hand over coming from caller scope like rootline, page array and eventually a request object. These vars are munged around a bit and enriched with a series of semi-static state variables: Things that can be injected like derived from context, for example frontend / backend user, workspace and similar. This ensures all typoscript 'conditions' receive similar structured data.

Parameters
$variables : array<string|int, mixed>

visitBeforeChildren()

Let symfony expression language handle the expression, gather expressions that have been handled since they influence page caching, negate expression verdicts if they're a [else] expression.

public visitBeforeChildren(IncludeInterface $include, int $currentDepth) : void
Parameters
$include : IncludeInterface
$currentDepth : int

        
On this page

Search results