‪TYPO3CMS  9.5
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 (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 getVariable ($var)
 
string getGroupList ()
 
int determinePageId ()
 
array getPage ()
 
int getPageIdByRecord ($table, $id, $ignoreTable=false)
 
bool isNewPageWithPageId ($pageId)
 
array determineRootline ()
 
int getUserId ()
 
bool isUserLoggedIn ()
 
bool isAdminUser ()
 
TYPO3 CMS Core Authentication BackendUserAuthentication getBackendUserAuthentication ()
 
- ‪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 backend disposal.

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

Definition at line 29 of file ConditionMatcher.php.

Constructor & Destructor Documentation

◆ __construct()

Member Function Documentation

◆ determinePageId()

int 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
Deprecated:
‪since TYPO3 v9.4, will be removed in TYPO3 v10.0.

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

Definition at line 172 of file ConditionMatcher.php.

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

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

◆ determineRootline()

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

◆ evaluateCondition()

◆ getBackendUserAuthentication()

TYPO3 CMS Core Authentication BackendUserAuthentication TYPO3\CMS\Backend\Configuration\TypoScript\ConditionMatching\ConditionMatcher::getBackendUserAuthentication ( )
protected

◆ getGroupList()

string 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
Deprecated:
‪since TYPO3 v9.4, will be removed in TYPO3 v10.0.

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

Definition at line 158 of file ConditionMatcher.php.

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

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

◆ getPage()

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

◆ getPageIdByRecord()

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

Gets the page id by a record.

Parameters
string$table‪Name of the table
int$id‪Id of the accordant record
bool$ignoreTable‪Whether to ignore the page, if TRUE a positive
Returns
‪int Id of the page the record is persisted on
Deprecated:
‪since TYPO3 v9.4, will be removed in TYPO3 v10.0.

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

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

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

◆ getVariable()

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

Returns GP / ENV vars

Parameters
string$var‪Identifier
Returns
‪mixed 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.

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

Definition at line 146 of file ConditionMatcher.php.

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

◆ isAdminUser()

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

◆ isNewPageWithPageId()

bool 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$pageId‪The 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
Deprecated:
‪since TYPO3 v9.4, will be removed in TYPO3 v10.0.

Definition at line 250 of file ConditionMatcher.php.

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

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

◆ isUserLoggedIn()

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

◆ updateExpressionLanguageVariables()

Member Data Documentation

◆ $context

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