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

Public Member Functions

 __construct (Context $context=null)
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Core\Configuration\TypoScript\ConditionMatching\AbstractConditionMatcher
 setPageId ($pageId)
 
int getPageId ()
 
 setRootline (array $rootline)
 
array getRootline ()
 
 setSimulateMatchResult ($simulateMatchResult)
 
 setSimulateMatchConditions (array $simulateMatchConditions)
 
bool match ($expression)
 

Protected Member Functions

 updateExpressionLanguageVariables ()
 
bool evaluateCondition ($string)
 
mixed null getVariable ($var)
 
mixed null getSessionVariable (string $var)
 
string getGroupList ()
 
int determinePageId ()
 
array getPage ()
 
array determineRootline ()
 
int getUserId ()
 
bool isUserLoggedIn ()
 
TYPO3 CMS Frontend Controller TypoScriptFrontendController getTypoScriptFrontendController ()
 
 getCurrentSiteLanguage ()
 
 getCurrentSite ()
 
- ‪Protected Member Functions inherited from ‪TYPO3\CMS\Core\Configuration\TypoScript\ConditionMatching\AbstractConditionMatcher
 initializeExpressionLanguageResolver ()
 
bool strictSyntaxEnabled ()
 
string normalizeExpression ($expression)
 
bool null evaluateExpression (string $expression)
 
bool null evaluateConditionCommon ($key, $value)
 
bool null evaluateCustomDefinedCondition ($condition)
 
array parseUserFuncArguments ($arguments)
 
mixed getVariableCommon (array $vars)
 
bool compareNumber ($test, $leftValue)
 
bool searchStringWildcard ($haystack, $needle)
 
mixed getGlobal ($var, $source=null)
 

Protected Attributes

Context $context
 
- ‪Protected Attributes inherited from ‪TYPO3\CMS\Core\Configuration\TypoScript\ConditionMatching\AbstractConditionMatcher
int $pageId
 
array $rootline
 
bool $simulateMatchResult = false
 
array $simulateMatchConditions = array( )
 
Resolver $expressionLanguageResolver
 
array $expressionLanguageResolverVariables = array( )
 

Detailed Description

Matching TypoScript conditions for frontend disposal.

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

Definition at line 32 of file ConditionMatcher.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Frontend\Configuration\TypoScript\ConditionMatching\ConditionMatcher::__construct ( Context  $context = null)

Member Function Documentation

◆ determinePageId()

int TYPO3\CMS\Frontend\Configuration\TypoScript\ConditionMatching\ConditionMatcher::determinePageId ( )
protected

Determines the current page Id.

Returns
‪int The current page Id
Deprecated:
‪since TYPO3 v9.4, will be removed in TYPO3 v10.0.

Reimplemented from TYPO3\CMS\Core\Configuration\TypoScript\ConditionMatching\AbstractConditionMatcher.

Definition at line 281 of file ConditionMatcher.php.

◆ determineRootline()

array TYPO3\CMS\Frontend\Configuration\TypoScript\ConditionMatching\ConditionMatcher::determineRootline ( )
protected

Determines the rootline for the current page.

Returns
‪array The rootline for the current page.
Deprecated:
‪since TYPO3 v9.4, will be removed in TYPO3 v10.0.

Reimplemented from TYPO3\CMS\Core\Configuration\TypoScript\ConditionMatching\AbstractConditionMatcher.

Definition at line 305 of file ConditionMatcher.php.

Referenced by TYPO3\CMS\Frontend\Configuration\TypoScript\ConditionMatching\ConditionMatcher\__construct().

◆ evaluateCondition()

bool TYPO3\CMS\Frontend\Configuration\TypoScript\ConditionMatching\ConditionMatcher::evaluateCondition (   $string)
protected

◆ getCurrentSite()

TYPO3\CMS\Frontend\Configuration\TypoScript\ConditionMatching\ConditionMatcher::getCurrentSite ( )
protected

Returns the currently configured site if a site is configured (= resolved) in the current request.

Deprecated:
‪since TYPO3 v9.4, will be removed in TYPO3 v10.0.

Definition at line 363 of file ConditionMatcher.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Frontend\Configuration\TypoScript\ConditionMatching\ConditionMatcher\evaluateCondition().

◆ getCurrentSiteLanguage()

TYPO3\CMS\Frontend\Configuration\TypoScript\ConditionMatching\ConditionMatcher::getCurrentSiteLanguage ( )
protected

Returns the currently configured "site language" if a site is configured (= resolved) in the current request.

Deprecated:
‪since TYPO3 v9.4, will be removed in TYPO3 v10.0.

Definition at line 349 of file ConditionMatcher.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Frontend\Configuration\TypoScript\ConditionMatching\ConditionMatcher\evaluateCondition().

◆ getGroupList()

string TYPO3\CMS\Frontend\Configuration\TypoScript\ConditionMatching\ConditionMatcher::getGroupList ( )
protected

Get the usergroup list of the current user.

Returns
‪string The usergroup list of the current user
Deprecated:
‪since TYPO3 v9.4, will be removed in TYPO3 v10.0.

Reimplemented from TYPO3\CMS\Core\Configuration\TypoScript\ConditionMatching\AbstractConditionMatcher.

Definition at line 268 of file ConditionMatcher.php.

Referenced by TYPO3\CMS\Frontend\Configuration\TypoScript\ConditionMatching\ConditionMatcher\evaluateCondition().

◆ getPage()

array TYPO3\CMS\Frontend\Configuration\TypoScript\ConditionMatching\ConditionMatcher::getPage ( )
protected

Gets the properties for the current page.

Returns
‪array The properties for the current page.
Deprecated:
‪since TYPO3 v9.4, will be removed in TYPO3 v10.0.

Reimplemented from TYPO3\CMS\Core\Configuration\TypoScript\ConditionMatching\AbstractConditionMatcher.

Definition at line 292 of file ConditionMatcher.php.

Referenced by TYPO3\CMS\Frontend\Configuration\TypoScript\ConditionMatching\ConditionMatcher\updateExpressionLanguageVariables().

◆ getSessionVariable()

mixed null TYPO3\CMS\Frontend\Configuration\TypoScript\ConditionMatching\ConditionMatcher::getSessionVariable ( string  $var)
protected

Return variable from current frontend user session

Parameters
string$var‪Session key
Returns
‪mixed|null The value of the variable pointed to or NULL if variable did not exist
Deprecated:
‪since TYPO3 v9.4, will be removed in TYPO3 v10.0.

Definition at line 241 of file ConditionMatcher.php.

References TYPO3\CMS\Frontend\Configuration\TypoScript\ConditionMatching\ConditionMatcher\getTypoScriptFrontendController().

Referenced by TYPO3\CMS\Frontend\Configuration\TypoScript\ConditionMatching\ConditionMatcher\getVariable().

◆ getTypoScriptFrontendController()

TYPO3 CMS Frontend Controller TypoScriptFrontendController TYPO3\CMS\Frontend\Configuration\TypoScript\ConditionMatching\ConditionMatcher::getTypoScriptFrontendController ( )
protected
Returns
‪\TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController
Deprecated:
‪since TYPO3 v9.4, will be removed in TYPO3 v10.0.

Definition at line 339 of file ConditionMatcher.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Frontend\Configuration\TypoScript\ConditionMatching\ConditionMatcher\getSessionVariable().

◆ getUserId()

int TYPO3\CMS\Frontend\Configuration\TypoScript\ConditionMatching\ConditionMatcher::getUserId ( )
protected

Get the id of the current user.

Returns
‪int The id of the current user
Deprecated:
‪since TYPO3 v9.4, will be removed in TYPO3 v10.0.

Reimplemented from TYPO3\CMS\Core\Configuration\TypoScript\ConditionMatching\AbstractConditionMatcher.

Definition at line 316 of file ConditionMatcher.php.

◆ getVariable()

mixed null TYPO3\CMS\Frontend\Configuration\TypoScript\ConditionMatching\ConditionMatcher::getVariable (   $name)
protected

Gets the value of a variable.

Examples of names:

  • ‪TSFE:id
  • ‪GP:firstLevel|secondLevel
  • ‪_GET|firstLevel|secondLevel
  • ‪LIT:someLiteralValue
Parameters
string$name‪The name of the variable to fetch the value from
Returns
‪mixed The value of the given variable (string) or NULL if variable did not exist
Deprecated:
‪since TYPO3 v9.4, will be removed in TYPO3 v10.0.

Reimplemented from TYPO3\CMS\Core\Configuration\TypoScript\ConditionMatching\AbstractConditionMatcher.

Definition at line 204 of file ConditionMatcher.php.

References TYPO3\CMS\Core\Configuration\TypoScript\ConditionMatching\AbstractConditionMatcher\getGlobal(), TYPO3\CMS\Frontend\Configuration\TypoScript\ConditionMatching\ConditionMatcher\getSessionVariable(), and TYPO3\CMS\Core\Configuration\TypoScript\ConditionMatching\AbstractConditionMatcher\getVariableCommon().

◆ isUserLoggedIn()

bool TYPO3\CMS\Frontend\Configuration\TypoScript\ConditionMatching\ConditionMatcher::isUserLoggedIn ( )
protected

Determines if a user is logged in.

Returns
‪bool Determines if a user is logged in
Deprecated:
‪since TYPO3 v9.4, will be removed in TYPO3 v10.0.

Reimplemented from TYPO3\CMS\Core\Configuration\TypoScript\ConditionMatching\AbstractConditionMatcher.

Definition at line 328 of file ConditionMatcher.php.

◆ updateExpressionLanguageVariables()

TYPO3\CMS\Frontend\Configuration\TypoScript\ConditionMatching\ConditionMatcher::updateExpressionLanguageVariables ( )
protected

Member Data Documentation

◆ $context

Context TYPO3\CMS\Frontend\Configuration\TypoScript\ConditionMatching\ConditionMatcher::$context
protected