Task #46461
closed
Extract displayCond functionality from FormEngine to new class
Added by Sebastian Michaelsen over 11 years ago.
Updated about 6 years ago.
Description
I'd like to extend the 'displayCond' mechanism by a new type, but \TYPO3\CMS\Backend\Form\FormEngine (formerly t3lib_TCEforms) is way to bloated anyway. So I thought this might be a good point to streamline FormEngine a bit and extract the displayCond functionality to a new class: \TYPO3\CMS\Backend\Form\ElementConditionMatcher
I (hope I) didn't change any functionality, I just tried to split thing a up into clean pieces.
- Status changed from New to Under Review
Accidently flagged this issue as "BUG", but it should rather be a "TASK"
- Tracker changed from Bug to Task
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Hey!
I got a fatal error by creating new media element (via page module).
Call to undefined method TYPO3\CMS\Backend\Form\ElementConditionMatcher::setRecord() in xxx/typo3_src-6.1.1/typo3/sysext/backend/Classes/Form/FormEngine.php on line 5954
5950 public function isDisplayCondition($displayCond, $row, $ffValueKey = '') {
5951 \TYPO3\CMS\Core\Utility\GeneralUtility::logDeprecatedFunction();
5952 /** @var $elementConditionMatcher \TYPO3\CMS\Backend\Form\ElementConditionMatcher */
5953 $elementConditionMatcher = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Form\\ElementConditionMatcher');
5954 $elementConditionMatcher->setRecord($row);
5955 $elementConditionMatcher->setFlexformValueKey($ffValueKey);
5956 return $elementConditionMatcher->match($displayCond);
5957 }
I am not surprised about this error, cause of the called method "setRecord()" is not a method in TYPO3\CMS\Backend\Form\ElementConditionMatcher.
Commenting out lines 5954 & 5955 has resolved the error and the media element is placed succesfully, but i am not sure whether this is the proper way.
- Status changed from Resolved to Closed
Also available in: Atom
PDF