AbstractConditionMatcher implements LoggerAwareInterface, ConditionMatcherInterface uses LoggerAwareTrait
Matching TypoScript conditions
since v12, will be removed in v13 together with old TypoScript parser
Used with the TypoScript parser. Matches IP numbers etc. for use with templates
Table of Contents
Interfaces
- LoggerAwareInterface
- ConditionMatcherInterface
- Used for TypoScript Conditions to be evaluated.
Properties
- $expressionLanguageResolver : Resolver
- $expressionLanguageResolverVariables : array<string|int, mixed>
- $pageId : int
- Id of the current page.
- $rootline : array<string|int, mixed>
- The rootline for the current page.
- $simulateMatchConditions : array<string|int, mixed>
- Whether to simulate the behaviour and match specific conditions (used in TypoScript object browser).
- $simulateMatchResult : bool
- Whether to simulate the behaviour and match all conditions (used in TypoScript object browser).
Methods
- getPageId() : int
- Gets the id of the page to evaluate conditions for.
- getRootline() : array<string|int, mixed>
- Gets the rootline.
- match() : bool
- Matches a TypoScript condition expression.
- setPageId() : mixed
- Sets the id of the page to evaluate conditions for.
- setRootline() : mixed
- Sets the rootline.
- setSimulateMatchConditions() : mixed
- Sets whether to simulate the behaviour and match specific conditions.
- setSimulateMatchResult() : mixed
- Sets whether to simulate the behaviour and match all conditions.
- evaluateExpression() : bool
- initializeExpressionLanguageResolver() : void
- updateExpressionLanguageVariables() : void
Properties
$expressionLanguageResolver
protected
Resolver
$expressionLanguageResolver
$expressionLanguageResolverVariables
protected
array<string|int, mixed>
$expressionLanguageResolverVariables
= []
$pageId
Id of the current page.
protected
int
$pageId
$rootline
The rootline for the current page.
protected
array<string|int, mixed>
$rootline
Tags
$simulateMatchConditions
Whether to simulate the behaviour and match specific conditions (used in TypoScript object browser).
protected
array<string|int, mixed>
$simulateMatchConditions
= []
$simulateMatchResult
Whether to simulate the behaviour and match all conditions (used in TypoScript object browser).
protected
bool
$simulateMatchResult
= false
Methods
getPageId()
Gets the id of the page to evaluate conditions for.
public
getPageId() : int
Return values
int —Id of the page
getRootline()
Gets the rootline.
public
getRootline() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —The rootline to be used for matching
match()
Matches a TypoScript condition expression.
public
match(string $expression) : bool
Parameters
- $expression : string
-
The expression to match
Return values
bool —Whether the expression matched
setPageId()
Sets the id of the page to evaluate conditions for.
public
setPageId(int $pageId) : mixed
Parameters
- $pageId : int
-
Id of the page (must be positive)
setRootline()
Sets the rootline.
public
setRootline(array<string|int, mixed> $rootline) : mixed
Parameters
- $rootline : array<string|int, mixed>
-
The rootline to be used for matching (must have elements)
setSimulateMatchConditions()
Sets whether to simulate the behaviour and match specific conditions.
public
setSimulateMatchConditions(array<string|int, mixed> $simulateMatchConditions) : mixed
Parameters
- $simulateMatchConditions : array<string|int, mixed>
-
Conditions to simulate a match for
setSimulateMatchResult()
Sets whether to simulate the behaviour and match all conditions.
public
setSimulateMatchResult(bool $simulateMatchResult) : mixed
Parameters
- $simulateMatchResult : bool
-
Whether to simulate positive matches
evaluateExpression()
protected
evaluateExpression(string $expression) : bool
Parameters
- $expression : string
Return values
boolinitializeExpressionLanguageResolver()
protected
initializeExpressionLanguageResolver() : void
updateExpressionLanguageVariables()
protected
updateExpressionLanguageVariables() : void