Task #69715

Story #69712: Further FormEngine development

Flex: Better encapsulation

Added by Christian Kuhn almost 4 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
Start date:
2015-09-12
Due date:
% Done:

100%

TYPO3 Version:
7
PHP Version:
Tags:
Complexity:
hard
Sprint Focus:
Stabilization Sprint

Description

getFlexIdentifier() of TcaFlex.php calculates the "pointer" that determines which defined data structure should be chosen.

The implementation is only sparse, documented stuff ( https://docs.typo3.org/typo3cms/TCAReference/Reference/Columns/Flex/Index.html ) like ds_pointerfield_searchparent is not handled.

getFlexFormDS() currently does two things: The pointer calculation and then fetching and parsing the structure. This should be split and unit tested put to FlexFormTools of ext:core (the only non-static class we have that handles flex form related stuff). Unsure about the error handling that is also happening - maybe better throw exceptions. Also the hint from resolvePossibleExternalFile() of TcaFlex should be taken into account and merged to the parser method.

There is a second (similar) method in BackendUtility::getRegisteredFlexForms that has a slightly different scope, though. The second one is used by the SelectItem data provider of flex forms, iirc.

In the end, the following methods should be deprecated and substituted by unit tested code within FlexFormTools that is split into sane capsules:

BackendUtility::getRegisteredFlexForms()
BackendUtility::getFlexFormDS
GeneralUtility::resolveSheetDefInDS()
GeneralUtility::resolveAllSheetsInDS()

It might be required to split this issue here into multiple smaller issues.


Related issues

Related to TYPO3 Core - Task #78581: Refactor flex form data structure handling Closed 2016-11-05

Associated revisions

Revision 38a1bc5d (diff)
Added by Christian Kuhn over 2 years ago

[!!!][TASK] Improve flex and TCA handling in FormEngine

The patch adapts a series of nasty form engine areas to more solid
code. The evaluate condition code is rewritten and works much better
in flex form scenarios. The suggest wizard and svg tree are much
more solid in flex forms. The group element is rewritten
towards a better readable and easier to refactor code, dropping
method dbFileIcons(). A bunch of issues is resolved along the way.

  • TCA "default" now works in flex form section container elements
  • The "displayCond" parser is now strict and throws exceptions on
    invalid syntax and wrong referenced fields to help debugging
    faulty display conditions
  • TCA displayCond on flex fields can now be prefixed with the
    sheet name and can reference field values from neighbor sheets
  • TCA displayCond now works with flex section containers
  • TCA flex section container now throw an exception if select or
    group fields configure a MM relation - this is not supported
  • TCA ctrl requestUpdate field is dropped, onChange=reload is now allowed
    not only on flex form fields, but also on normal columns fields
  • TCA tree now works as section container element and initializes
    correctly on new records and new containers
  • GroupElement rewrite to drop dbFileIcons()
  • config option maxitems now optional for type=group and type=select
    and defaults to "many items allowed"
  • inline now works in "fancy" flex situations with "new" records
    by handing the final dataStructureIdentifier around
  • FormEngine no longer loads extJS

Change-Id: Id1d081627529cc1502bb198389e5bd69372815cd
Resolves: #78899
Resolves: #72307
Resolves: #75646
Resolves: #76637
Resolves: #72106
Resolves: #78824
Resolves: #76793
Resolves: #68247
Resolves: #69715
Related: #78460
Related: #67198
Related: #72294
Releases: master
Reviewed-on: https://review.typo3.org/50879
Tested-by: TYPO3com <>
Reviewed-by: Benni Mack <>
Tested-by: Benni Mack <>
Reviewed-by: Anja Leichsenring <>
Tested-by: Anja Leichsenring <>

History

#1 Updated by Christian Kuhn almost 4 years ago

  • Target version set to 7.5
  • Complexity set to hard
  • Sprint Focus set to On Location Sprint

#2 Updated by Anja Leichsenring almost 4 years ago

  • Sprint Focus changed from On Location Sprint to Stabilization Sprint

#3 Updated by Benni Mack almost 4 years ago

  • Target version changed from 7.5 to 7 LTS

#4 Updated by Christian Kuhn over 2 years ago

partially solved with #78581 but not yet rolled out to formEngine completely.

#5 Updated by Gerrit Code Review over 2 years ago

  • Status changed from New to Under Review

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

#6 Updated by Gerrit Code Review over 2 years ago

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

#7 Updated by Gerrit Code Review over 2 years ago

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

#8 Updated by Gerrit Code Review over 2 years ago

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

#9 Updated by Gerrit Code Review over 2 years ago

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

#10 Updated by Gerrit Code Review over 2 years ago

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

#11 Updated by Gerrit Code Review over 2 years ago

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

#12 Updated by Gerrit Code Review over 2 years ago

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

#13 Updated by Gerrit Code Review over 2 years ago

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

#14 Updated by Christian Kuhn over 2 years ago

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

#15 Updated by Riccardo De Contardi almost 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF