Project

General

Profile

Actions

Bug #62944

closed

displayCond should allow userFunc as condition

Added by Sebastian Fischer about 10 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Backend API
Target version:
-
Start date:
2014-11-14
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
7
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

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


Related issues 1 (0 open1 closed)

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

Actions
Actions #1

Updated by Sebastian Fischer about 10 years ago

The userFunc should get handed the following informations:
if new:
-tablename
-fieldname
-fieldconfig
-currentPageId

if already saved once:
-tablename
-fieldname
-fieldconfig
-currentPageId
-currentRecordData

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',

Actions #2

Updated by Benni Mack about 10 years ago

Want to implement this? Would be great!

Actions #3

Updated by Gerrit Code Review almost 10 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/34728

Actions #4

Updated by Gerrit Code Review almost 10 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/34728

Actions #5

Updated by Gerrit Code Review almost 10 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/34728

Actions #6

Updated by Gerrit Code Review almost 10 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/34728

Actions #7

Updated by Gerrit Code Review almost 10 years ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/34728

Actions #8

Updated by Wouter Wolters almost 10 years ago

  • Status changed from Under Review to Resolved
Actions #9

Updated by José Ricardo almost 10 years ago

As an additional feature, I suggest extending this to sheets.
The solution seems to be simple, just adding the case 'USER': in the switch on method getSingleField_typeFlex at TYPO3\CMS\Backend\Form\FormEngine.php

Actions #10

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF