TYPO3 CMS  TYPO3_6-2
TYPO3\CMS\Backend\Configuration\TypoScript\ConditionMatching\ConditionMatcher Class Reference
Inheritance diagram for TYPO3\CMS\Backend\Configuration\TypoScript\ConditionMatching\ConditionMatcher:
TYPO3\CMS\Core\Configuration\TypoScript\ConditionMatching\AbstractConditionMatcher t3lib_matchCondition_backend

Public Member Functions

 __construct ()
 
- 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 Member Functions

 evaluateCondition ($string)
 
 getVariable ($var)
 
 getGroupList ()
 
 determinePageId ()
 
 getPage ()
 
 getPageIdByRecord ($table, $id, $ignoreTable=FALSE)
 
 isNewPageWithPageId ($pageId)
 
 determineRootline ()
 
 getUserId ()
 
 isUserLoggedIn ()
 
 isAdminUser ()
 
 log ($message)
 
- 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

- Protected Attributes inherited from TYPO3\CMS\Core\Configuration\TypoScript\ConditionMatching\AbstractConditionMatcher
 $pageId
 
 $rootline
 
 $simulateMatchResult = FALSE
 
 $simulateMatchConditions = array()
 

Detailed Description

Matching TypoScript conditions for backend disposal.

Used with the TypoScript parser. Matches browserinfo, IPnumbers for use with templates

Author
Kasper Skårhøj kaspe.nosp@m.rYYY.nosp@m.Y@typ.nosp@m.o3.c.nosp@m.om

Definition at line 28 of file ConditionMatcher.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Backend\Configuration\TypoScript\ConditionMatching\ConditionMatcher::__construct ( )

Constructor for this class

Definition at line 33 of file ConditionMatcher.php.

Member Function Documentation

◆ determinePageId()

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

Tries to determine the ID of the page currently processed. When User/Group TS-Config is parsed when no specific page is handled (i.e. in the Extension Manager, etc.) this function will return "0", so that the accordant conditions (e.g. PIDinRootline) will return "FALSE"

Returns
integer The determined page id or otherwise 0

Definition at line 126 of file ConditionMatcher.php.

References TYPO3\CMS\Core\Configuration\TypoScript\ConditionMatching\AbstractConditionMatcher\$pageId, $uid, TYPO3\CMS\Core\Utility\GeneralUtility\_GP(), and TYPO3\CMS\Backend\Configuration\TypoScript\ConditionMatching\ConditionMatcher\getPageIdByRecord().

Referenced by TYPO3\CMS\Backend\Configuration\TypoScript\ConditionMatching\ConditionMatcher\determineRootline(), and TYPO3\CMS\Backend\Configuration\TypoScript\ConditionMatching\ConditionMatcher\getPage().

◆ determineRootline()

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

◆ evaluateCondition()

◆ getGroupList()

TYPO3\CMS\Backend\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 113 of file ConditionMatcher.php.

References $GLOBALS.

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

◆ getPage()

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

Gets the properties for the current page.

Returns
array The properties for the current page.

Definition at line 159 of file ConditionMatcher.php.

References TYPO3\CMS\Core\Configuration\TypoScript\ConditionMatching\AbstractConditionMatcher\$pageId, and TYPO3\CMS\Backend\Configuration\TypoScript\ConditionMatching\ConditionMatcher\determinePageId().

◆ getPageIdByRecord()

TYPO3\CMS\Backend\Configuration\TypoScript\ConditionMatching\ConditionMatcher::getPageIdByRecord (   $table,
  $id,
  $ignoreTable = FALSE 
)
protected

Gets the page id by a record.

Parameters
string$tableName of the table
integer$idId of the accordant record
boolean$ignoreTableWhether to ignore the page, if TRUE a positive
Returns
integer Id of the page the record is persisted on

Definition at line 172 of file ConditionMatcher.php.

References TYPO3\CMS\Core\Configuration\TypoScript\ConditionMatching\AbstractConditionMatcher\$pageId, and TYPO3\CMS\Backend\Utility\BackendUtility\getRecordWSOL().

Referenced by TYPO3\CMS\Backend\Configuration\TypoScript\ConditionMatching\ConditionMatcher\determinePageId().

◆ getUserId()

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

Get the id of the current user.

Returns
integer The id of the current user

Definition at line 240 of file ConditionMatcher.php.

References $GLOBALS.

◆ getVariable()

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

Returns GP / ENV vars

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

Definition at line 103 of file ConditionMatcher.php.

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

◆ isAdminUser()

TYPO3\CMS\Backend\Configuration\TypoScript\ConditionMatching\ConditionMatcher::isAdminUser ( )
protected

Determines whether the current user is admin.

Returns
boolean Whether the current user is admin

Definition at line 263 of file ConditionMatcher.php.

References $GLOBALS.

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

◆ isNewPageWithPageId()

TYPO3\CMS\Backend\Configuration\TypoScript\ConditionMatching\ConditionMatcher::isNewPageWithPageId (   $pageId)
protected

Determine if record of table 'pages' with the given $pid is currently created in TCEforms. This information is required for conditions in BE for PIDupinRootline.

Parameters
integer$pidThe pid the check for as parent page
Returns
boolean TRUE if the is currently a new page record being edited with $pid as uid of the parent page

Definition at line 193 of file ConditionMatcher.php.

References $GLOBALS, TYPO3\CMS\Core\Configuration\TypoScript\ConditionMatching\AbstractConditionMatcher\$pageId, and $uid.

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

◆ isUserLoggedIn()

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

Determines if a user is logged in.

Returns
boolean Determines if a user is logged in

Definition at line 250 of file ConditionMatcher.php.

References $GLOBALS.

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

◆ log()

TYPO3\CMS\Backend\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 277 of file ConditionMatcher.php.

References $GLOBALS.