‪TYPO3CMS  ‪main
TYPO3\CMS\Core\ExpressionLanguage\Resolver Class Reference

Public Member Functions

 __construct (string $context, array $variables)
 evaluate (string $expression, array $contextVariables=[])
 compile (string $condition)

Private Attributes

ExpressionLanguage $expressionLanguage
array $expressionLanguageVariables

Detailed Description

The main API endpoint to evaluate symfony expression language.

This Resolver can prepare common variables and functions for specific scopes, it is a "prepared" facade to symfony expression language that can load and provide things from Configuration.

Definition at line 31 of file Resolver.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Core\ExpressionLanguage\Resolver::__construct ( string  $context,
array  $variables 

Definition at line 36 of file Resolver.php.

Member Function Documentation

◆ compile()

TYPO3\CMS\Core\ExpressionLanguage\Resolver::compile ( string  $condition)

Compiles an expression to source code. Currently unused in core: We may add support for this later to speed up condition parsing?

Definition at line 80 of file Resolver.php.

◆ evaluate()

TYPO3\CMS\Core\ExpressionLanguage\Resolver::evaluate ( string  $expression,
array  $contextVariables = [] 

Evaluate an expression.

Definition at line 71 of file Resolver.php.

Referenced by TYPO3\CMS\Form\Domain\Model\Renderable\RenderableVariant\conditionMatches().

Member Data Documentation

◆ $expressionLanguage

ExpressionLanguage TYPO3\CMS\Core\ExpressionLanguage\Resolver::$expressionLanguage

Definition at line 33 of file Resolver.php.

◆ $expressionLanguageVariables

array TYPO3\CMS\Core\ExpressionLanguage\Resolver::$expressionLanguageVariables

Definition at line 34 of file Resolver.php.