Task #69568

The FormEngine is dead, long live the FormEngine

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

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

100%

TYPO3 Version:
7
PHP Version:
5.6
Tags:
Complexity:
nightmare
Sprint Focus:

Related issues

Related to TYPO3 Core - Feature #35337: Hook Request for t3lib_transferData Rejected 2012-03-28
Related to TYPO3 Core - Story #69617: FormEngine bugs Accepted 2012-08-28

Associated revisions

Revision b524fc86 (diff)
Added by Christian Kuhn about 4 years ago

[!!!][TASK] The FormEngine is dead, long live the FormEngine!

tl;dr: This patch makes FormEngine insanely flexible, extensions
however should not rely on structures for now, since class names
and array content will change.

The patch applies a separation of concerns to the FormEngine
class structure by extracting the data processing from rendering.

As a main goal the render part consisting of container and element
classes routed through the flexible NodeFactory only works on data
created by the new FormDataCompiler class construct. This makes the
FormEngine much more flexible and opens ways to not only use the render
part in the context of database driven data, but on anything that is
fed to it.

This patch creates the main structure for this. The FormDataCompiler
class returns a defined array container and elements can work on it.
Data is added by single FormDataProvider, which are combined in
FormDataGroups. FormDataProvider may depend on each other and a
FormDataGroup "knows" its providers and calls them in a dedicated order.

For instance, the "FullDatabaseRecord" FormDataGroup first calls a
provider that fetches the record defined by uid and table name and
a later called provider determines the given record type this record
is assigned to, so another provider can then work on TCA to determine
the list of record fields to be shown. The FormDataProvider used
for the main FormDataGroup are defined in TYPO3_CONF_VARS, so
extensions can add and remove their own providers to add or change
certain data if needed. This is highly flexible and extensions are
able to hook in at a specific position within the provider chain for
the main data groups.

This construct obsoletes the DataPreprocessor as well as several
other side classes.

With this patch the main architecture is created and lots of data
preparation is transfered already, supported by a high unit test
coverage.

The FormEngine class itself is removed: The inline ajax entry point
is moved to an own controller class, the getMainFields() and friends
methods are substituted with FormDataCompiler / NodeFactory combinations
and the data gathering is for now parked in a FormResultCompiler class.

However, this process is not yet finished and lots of @todo
statements are added to the code base to document open ends and to
further separate the data handling from the render engine. Especially
the IRRE data handling is currently still located within the render
engine and makes the whole thing much more complicated than it should
be. Lots of detail patches need to follow to bring this code
to a level where it belongs to be.

Warning: While this patch is already insanely huge touching more than
22 thousands lines of code, lots of loose ends need to be tackled and
the API is not final yet. The arrays will be reduced and sharpened
during the next weeks, class names may change and structures will
change.

Change-Id: Ief1769f478373cc26d1bf6c49114258f0dae8355
Resolves: #69568
Releases: master
Reviewed-on: http://review.typo3.org/41933
Reviewed-by: Anja Leichsenring <>
Tested-by: Anja Leichsenring <>
Reviewed-by: Florian Peters <>
Reviewed-by: Mathias Schreiber <>
Tested-by: Mathias Schreiber <>
Reviewed-by: Alexander Opitz <>
Tested-by: Alexander Opitz <>
Reviewed-by: Wouter Wolters <>
Tested-by: Wouter Wolters <>
Reviewed-by: Christian Kuhn <>
Tested-by: Christian Kuhn <>

History

#1 Updated by Gerrit Code Review about 4 years ago

  • Status changed from New to Under Review

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

#2 Updated by Gerrit Code Review about 4 years ago

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

#3 Updated by Gerrit Code Review about 4 years ago

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

#4 Updated by Gerrit Code Review about 4 years ago

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

#5 Updated by Gerrit Code Review about 4 years ago

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

#6 Updated by Gerrit Code Review about 4 years ago

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

#7 Updated by Gerrit Code Review about 4 years ago

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

#8 Updated by Gerrit Code Review about 4 years ago

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

#9 Updated by Gerrit Code Review about 4 years ago

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

#10 Updated by Gerrit Code Review about 4 years ago

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

#11 Updated by Gerrit Code Review about 4 years ago

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

#12 Updated by Gerrit Code Review about 4 years ago

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

#13 Updated by Gerrit Code Review about 4 years ago

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

#14 Updated by Gerrit Code Review about 4 years ago

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

#15 Updated by Gerrit Code Review about 4 years ago

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

#16 Updated by Christian Kuhn about 4 years ago

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

#17 Updated by Riccardo De Contardi about 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF