displayCond should allow userFunc as condition
Would be great to have userFuncs usable in TCA displayCond.
By this it would be possible to have custom rules implemented wether a field should get shown or not
[FEATURE] displayCond should allow userFunc as condition
This patch enables the usage of a displayCond defined as
Reviewed-by: Anja Leichsenring <email@example.com>
Tested-by: Anja Leichsenring <firstname.lastname@example.org>
Reviewed-by: Benjamin Mack <email@example.com>
Tested-by: Benjamin Mack <firstname.lastname@example.org>
#1 Updated by Sebastian Fischer over 4 years ago
The userFunc should get handed the following informations:
if already saved once:
Return Value would be boolean as its just a decision if the field should be displayed or not.
The userFunc should be called with TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction to have the same handling like every other userfunc
Example for a configuration would be
'displayCond' => 'USER:\Example\Namespace\UserClass->functionName:REQ:true',