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

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)
 
 getBackendUserAuthentication ()
 
- 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 = []
 

Detailed Description

Matching TypoScript conditions for backend disposal.

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

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
int The determined page id or otherwise 0

Definition at line 133 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()

◆ getBackendUserAuthentication()

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

References TYPO3\CMS\Backend\Configuration\TypoScript\ConditionMatching\ConditionMatcher\getBackendUserAuthentication().

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

◆ getPage()

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

◆ 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
int$idId of the accordant record
bool$ignoreTableWhether to ignore the page, if TRUE a positive
Returns
int Id of the page the record is persisted on

Definition at line 186 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
int The id of the current user

Definition at line 256 of file ConditionMatcher.php.

References TYPO3\CMS\Backend\Configuration\TypoScript\ConditionMatching\ConditionMatcher\getBackendUserAuthentication().

◆ 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 109 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
bool Whether the current user is admin

Definition at line 276 of file ConditionMatcher.php.

References TYPO3\CMS\Backend\Configuration\TypoScript\ConditionMatching\ConditionMatcher\getBackendUserAuthentication().

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
int$pageIdThe pid the check for as parent page
Returns
bool TRUE if the is currently a new page record being edited with $pid as uid of the parent page

Definition at line 208 of file ConditionMatcher.php.

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

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

◆ isUserLoggedIn()

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

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

References TYPO3\CMS\Backend\Configuration\TypoScript\ConditionMatching\ConditionMatcher\getBackendUserAuthentication().