Task #86196
Updated by Susanne Moog about 6 years ago
Currently Symfony ExpressionLanguage is used in two contexts:
- the form framework
- typoscript condition matching
registration and providing context is done in two different ways and is extensible in two different ways. Before the LTS release these should be unified and documented.
Tasks:
- Add Configuration/ExpressionLanguage.php and corresponding loader with caching
<pre><code class="php">
// Config
<?php
return [
'be-conditions' => [
'variables' => [
\TYPO3\CMS\Core\ExpressionLanguage\TypoScriptConditionProvider
],
'functions' => [
\TYPO3\CMS\Core\ExpressionLanguage\TypoScriptConditionFunctionsProvider
]
],
'fe-conditions' => [
'variables' => [
\TYPO3\CMS\Core\ExpressionLanguage\TypoScriptConditionProvider
],
'functions' => [
\TYPO3\CMS\Core\ExpressionLanguage\TypoScriptConditionFunctionsProvider,
\TYPO3\CMS\Core\ExpressionLanguage\TypoScriptFrontendConditionFunctionsProvider
]
],
'ext-form' => [
'variables' => [
\TYPO3\CMS\Core\ExpressionLanguage\TypoScriptConditionProvider,
\TYPO3\CMS\Form\Domain\Condition\ConditionProvider
],
'functions' => [
\TYPO3\CMS\Core\ExpressionLanguage\TypoScriptFrontendConditionFunctionsProvider
]
]
];
// Usage:
$expressionLanguage = new \TYPO3\CMS\Core\ExpressionLanguage\Resolver('ext-form');</code></pre>
- Load expressionLanguage via loader with context argument in form and conditionMatcher
- Remove yaml config in form context