[FEATURE] Custom TypoScript-conditions also in backend
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / Documentation / Changelog / master / Feature-63600-CustomTypoScriptConditionsInBackend.rst
1 ====================================================================
2 Feature: #61489 - Allow own TypoScript Conditions in Backend as well
3 ====================================================================
4
5 Description
6 ===========
7
8 It is now possible to add own TypoScript conditions via a separate API in the Backend. The API for the frontend
9 was introduced with TYPO3 CMS 7.0.
10
11 An extension / package can now ship an implementation of a new abstract class AbstractCondition. Via the existing
12 TypoScript Condition Syntax the class is called by the simple full namespaced class name.
13 The class's main function "matchCondition" can flexibly evaluate any parameters given after the class name.
14
15 Usage:
16
17 .. code-block:: typoscript
18
19 [BigCompanyName\TypoScriptLovePackage\MyCustomTypoScriptCondition]
20
21 [BigCompanyName\TypoScriptLovePackage\MyCustomTypoScriptCondition = 7]
22
23 [BigCompanyName\TypoScriptLovePackage\MyCustomTypoScriptCondition = 7, != 6]
24
25 [BigCompanyName\TypoScriptLovePackage\MyCustomTypoScriptCondition = {$mysite.myconstant}]
26
27 where the TypoScript Condition class deals with =/!= etc itself.
28
29 Impact
30 ======
31
32 If you've previously used the "userFunc" condition, you are encouraged to use this new API for your own TypoScript
33 conditions.