IncludeTreeConditionMatcherVisitor implements IncludeTreeVisitorInterface, LoggerAwareInterface uses LoggerAwareTrait
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
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
__construct()
public
__construct(Context $context, PageLayoutResolver $pageLayoutResolver) : mixed
Parameters
- $context : Context
- $pageLayoutResolver : PageLayoutResolver
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>
visit()
Main visit method called for each node.
public
visit(IncludeInterface $include, int $currentDepth) : void
Parameters
- $include : IncludeInterface
- $currentDepth : int
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