Issue Task Closed

#86196Centralize ExpressionLanguage Registration via API

Susanne Moog 09/07/18, 21:28 updated 10/02/18, 10:25

Description

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


// Config

<?php

return [
    'conditions' => [
            \TYPO3\CMS\Core\ExpressionLanguage\Typo3ConditionProvider
    ],
    'ext-form' => [
            \TYPO3\CMS\Core\ExpressionLanguage\Typo3ConditionProvider,
            \TYPO3\CMS\Form\Domain\Condition\ConditionProvider
    ]
];

// Usage:
$expressionLanguage = new \TYPO3\CMS\Core\ExpressionLanguage\Resolver('ext-form');

- Load expressionLanguage via loader with context argument in form and conditionMatcher
- Remove yaml config in form

Reviews 5