‪TYPO3CMS  ‪main
TYPO3\CMS\Core\Configuration\TypoScript\ConditionMatching\AbstractConditionMatcher Class Reference
Inheritance diagram for TYPO3\CMS\Core\Configuration\TypoScript\ConditionMatching\AbstractConditionMatcher:
TYPO3\CMS\Core\Configuration\TypoScript\ConditionMatching\ConditionMatcherInterface TYPO3\CMS\Backend\Configuration\TypoScript\ConditionMatching\ConditionMatcher TYPO3\CMS\Frontend\Configuration\TypoScript\ConditionMatching\ConditionMatcher

Public Member Functions

 setPageId ($pageId)
 
int getPageId ()
 
 setRootline (array $rootline)
 
array getRootline ()
 
 setSimulateMatchResult ($simulateMatchResult)
 
 setSimulateMatchConditions (array $simulateMatchConditions)
 
bool match ($expression)
 

Protected Member Functions

 initializeExpressionLanguageResolver ()
 
 updateExpressionLanguageVariables ()
 
 evaluateExpression (string $expression)
 

Protected Attributes

int $pageId
 
array $rootline
 
bool $simulateMatchResult = false
 
array $simulateMatchConditions = array( )
 
Resolver $expressionLanguageResolver
 
array $expressionLanguageResolverVariables = array( )
 

Detailed Description

Matching TypoScript conditions

Used with the TypoScript parser. Matches IP numbers etc. for use with templates

Deprecated:
‪since v12, will be removed in v13 together with old TypoScript parser

Definition at line 36 of file AbstractConditionMatcher.php.

Member Function Documentation

◆ evaluateExpression()

TYPO3\CMS\Core\Configuration\TypoScript\ConditionMatching\AbstractConditionMatcher::evaluateExpression ( string  $expression)
protected

◆ getPageId()

int TYPO3\CMS\Core\Configuration\TypoScript\ConditionMatching\AbstractConditionMatcher::getPageId ( )

Gets the id of the page to evaluate conditions for.

Returns
‪int Id of the page

Definition at line 112 of file AbstractConditionMatcher.php.

References TYPO3\CMS\Core\Configuration\TypoScript\ConditionMatching\AbstractConditionMatcher\$pageId.

◆ getRootline()

array TYPO3\CMS\Core\Configuration\TypoScript\ConditionMatching\AbstractConditionMatcher::getRootline ( )

Gets the rootline.

Returns
‪array The rootline to be used for matching
Todo:
‪: Set to protected. These classes should be data-sinks, not data-sources.

Definition at line 137 of file AbstractConditionMatcher.php.

References TYPO3\CMS\Core\Configuration\TypoScript\ConditionMatching\AbstractConditionMatcher\$rootline.

◆ initializeExpressionLanguageResolver()

◆ match()

bool TYPO3\CMS\Core\Configuration\TypoScript\ConditionMatching\AbstractConditionMatcher::match (   $expression)

◆ setPageId()

TYPO3\CMS\Core\Configuration\TypoScript\ConditionMatching\AbstractConditionMatcher::setPageId (   $pageId)

◆ setRootline()

TYPO3\CMS\Core\Configuration\TypoScript\ConditionMatching\AbstractConditionMatcher::setRootline ( array  $rootline)

◆ setSimulateMatchConditions()

TYPO3\CMS\Core\Configuration\TypoScript\ConditionMatching\AbstractConditionMatcher::setSimulateMatchConditions ( array  $simulateMatchConditions)

Sets whether to simulate the behaviour and match specific conditions.

Parameters
array$simulateMatchConditions‪Conditions to simulate a match for

Definition at line 159 of file AbstractConditionMatcher.php.

References TYPO3\CMS\Core\Configuration\TypoScript\ConditionMatching\AbstractConditionMatcher\$simulateMatchConditions.

◆ setSimulateMatchResult()

TYPO3\CMS\Core\Configuration\TypoScript\ConditionMatching\AbstractConditionMatcher::setSimulateMatchResult (   $simulateMatchResult)

Sets whether to simulate the behaviour and match all conditions.

Parameters
bool$simulateMatchResult‪Whether to simulate positive matches

Definition at line 147 of file AbstractConditionMatcher.php.

References TYPO3\CMS\Core\Configuration\TypoScript\ConditionMatching\AbstractConditionMatcher\$simulateMatchResult.

◆ updateExpressionLanguageVariables()

TYPO3\CMS\Core\Configuration\TypoScript\ConditionMatching\AbstractConditionMatcher::updateExpressionLanguageVariables ( )
protected

Member Data Documentation

◆ $expressionLanguageResolver

Resolver TYPO3\CMS\Core\Configuration\TypoScript\ConditionMatching\AbstractConditionMatcher::$expressionLanguageResolver
protected

Definition at line 72 of file AbstractConditionMatcher.php.

◆ $expressionLanguageResolverVariables

array TYPO3\CMS\Core\Configuration\TypoScript\ConditionMatching\AbstractConditionMatcher::$expressionLanguageResolverVariables = array( )
protected

Definition at line 76 of file AbstractConditionMatcher.php.

◆ $pageId

◆ $rootline

array TYPO3\CMS\Core\Configuration\TypoScript\ConditionMatching\AbstractConditionMatcher::$rootline
protected

The rootline for the current page.

Todo:
‪: In FE, this is the "stops at sys_template root" TSFE->config['rootLine'] one, from the uppermost page down to leaf page. In BE, this is the full rootline from the uppermost page down to leaf page. Refactor this mess, also see $fullRootline in FE ConditionMatcher.

Definition at line 54 of file AbstractConditionMatcher.php.

Referenced by TYPO3\CMS\Core\Configuration\TypoScript\ConditionMatching\AbstractConditionMatcher\getRootline(), TYPO3\CMS\Core\Configuration\TypoScript\ConditionMatching\AbstractConditionMatcher\setRootline(), TYPO3\CMS\Backend\Configuration\TypoScript\ConditionMatching\ConditionMatcher\updateExpressionLanguageVariables(), and TYPO3\CMS\Frontend\Configuration\TypoScript\ConditionMatching\ConditionMatcher\updateExpressionLanguageVariables().

◆ $simulateMatchConditions

array TYPO3\CMS\Core\Configuration\TypoScript\ConditionMatching\AbstractConditionMatcher::$simulateMatchConditions = array( )
protected

Whether to simulate the behaviour and match specific conditions (used in TypoScript object browser).

Definition at line 68 of file AbstractConditionMatcher.php.

Referenced by TYPO3\CMS\Core\Configuration\TypoScript\ConditionMatching\AbstractConditionMatcher\setSimulateMatchConditions().

◆ $simulateMatchResult

bool TYPO3\CMS\Core\Configuration\TypoScript\ConditionMatching\AbstractConditionMatcher::$simulateMatchResult = false
protected