TYPO3 CMS  TYPO3_7-6
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

Protected Member Functions

 evaluateCondition ($string)
 
 getVariable ($var)
 
 getGroupList ()
 
 determinePageId ()
 
 getPage ()
 
 determineRootline ()
 
 getUserId ()
 
 isUserLoggedIn ()
 
 log ($message)
 
 getTypoScriptFrontendController ()
 
 getTimeTracker ()
 
- Protected Member Functions inherited from TYPO3\CMS\Core\Configuration\TypoScript\ConditionMatching\AbstractConditionMatcher
 normalizeExpression ($expression)
 
 evaluateConditionCommon ($key, $value)
 
 parseUserFuncArguments ($arguments)
 
 getVariableCommon (array $vars)
 
 compareNumber ($test, $leftValue)
 
 searchStringWildcard ($haystack, $needle)
 
 getBrowserInfo ($userAgent)
 
 getDeviceType ($userAgent)
 
 getGlobal ($var, $source=null)
 
 evaluateCondition ($string)
 
 getVariable ($name)
 
 getGroupList ()
 
 determinePageId ()
 
 getPage ()
 
 determineRootline ()
 
 getUserId ()
 
 isUserLoggedIn ()
 
 log ($message)
 

Additional Inherited Members

- Public Member Functions inherited from TYPO3\CMS\Core\Configuration\TypoScript\ConditionMatching\AbstractConditionMatcher
 setPageId ($pageId)
 
 getPageId ()
 
 setRootline (array $rootline)
 
 getRootline ()
 
 setSimulateMatchResult ($simulateMatchResult)
 
 setSimulateMatchConditions (array $simulateMatchConditions)
 
 match ($expression)
 
- Protected Attributes inherited from TYPO3\CMS\Core\Configuration\TypoScript\ConditionMatching\AbstractConditionMatcher
 $pageId
 
 $rootline
 
 $simulateMatchResult = false
 
 $simulateMatchConditions = []
 

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 26 of file ConditionMatcher.php.

Member Function Documentation

◆ determinePageId()

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

Determines the current page Id.

Returns
int The current page Id

Definition at line 131 of file ConditionMatcher.php.

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

◆ determineRootline()

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

Determines the rootline for the current page.

Returns
array The rootline for the current page.

Definition at line 151 of file ConditionMatcher.php.

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

◆ evaluateCondition()

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

Evaluates a TypoScript condition given as input, eg. "[browser=net][...(other conditions)...]"

Parameters
string$stringThe condition to match against its criterias.
Returns
bool Whether the condition matched
See also
::parse()
Exceptions

Definition at line 37 of file ConditionMatcher.php.

References TYPO3\CMS\Core\Configuration\TypoScript\ConditionMatching\AbstractConditionMatcher\evaluateConditionCommon(), TYPO3\CMS\Frontend\Configuration\TypoScript\ConditionMatching\ConditionMatcher\getGroupList(), TYPO3\CMS\Core\Utility\GeneralUtility\inList(), and TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode().

◆ getGroupList()

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

Definition at line 121 of file ConditionMatcher.php.

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

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

◆ getPage()

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

Gets the properties for the current page.

Returns
array The properties for the current page.

Definition at line 141 of file ConditionMatcher.php.

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

◆ getTimeTracker()

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

◆ getTypoScriptFrontendController()

◆ getUserId()

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

Get the id of the current user.

Returns
int The id of the current user

Definition at line 161 of file ConditionMatcher.php.

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

◆ getVariable()

TYPO3\CMS\Frontend\Configuration\TypoScript\ConditionMatching\ConditionMatcher::getVariable (   $var)
protected

Returns GP / ENV / TSFE vars

Parameters
string$varIdentifier
Returns
mixed The value of the variable pointed to or NULL if variable did not exist

Definition at line 97 of file ConditionMatcher.php.

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

◆ isUserLoggedIn()

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

Definition at line 171 of file ConditionMatcher.php.

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

◆ log()

TYPO3\CMS\Frontend\Configuration\TypoScript\ConditionMatching\ConditionMatcher::log (   $message)
protected

Set/write a log message.

Parameters
string$messageThe log message to set/write
Returns
void

Definition at line 182 of file ConditionMatcher.php.

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