Task #46461

Extract displayCond functionality from FormEngine to new class

Added by Sebastian Michaelsen about 8 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2013-03-20
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.1
PHP Version:
Tags:
Complexity:
Sprint Focus:

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.


Related issues

Related to TYPO3 Core - Bug #47988: Colon not possible in TCA "displayCond" valueClosed2013-05-06

Actions
Related to TYPO3 Core - Bug #49354: Call to undefined method TYPO3\CMS\Backend\Form\ElementConditionMatcher::setRecord()Closed2013-06-23

Actions
Blocks TYPO3 Core - Feature #46460: Introduce TCA displayCond type "USER"Closed2013-03-20

Actions
#1

Updated by Gerrit Code Review about 8 years ago

  • Status changed from New to Under Review

Patch set 3 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/19080

#2

Updated by Sebastian Michaelsen about 8 years ago

Accidently flagged this issue as "BUG", but it should rather be a "TASK"

#3

Updated by Stefan Galinski about 8 years ago

  • Tracker changed from Bug to Task
#4

Updated by Gerrit Code Review about 8 years ago

Patch set 4 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/19080

#5

Updated by Gerrit Code Review about 8 years ago

Patch set 5 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/19080

#6

Updated by Gerrit Code Review about 8 years ago

Patch set 6 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/19080

#7

Updated by Gerrit Code Review about 8 years ago

Patch set 7 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/19080

#8

Updated by Gerrit Code Review about 8 years ago

Patch set 8 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/19080

#9

Updated by Gerrit Code Review about 8 years ago

Patch set 9 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/19080

#10

Updated by Gerrit Code Review about 8 years ago

Patch set 10 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/19080

#11

Updated by Sebastian Michaelsen about 8 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
#12

Updated by David Greiner about 8 years ago

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.

#13

Updated by Benni Mack over 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF