Feature #67890

Redesign FluidTemplateDataProcessorInterface

Added by Patrick Broens over 4 years ago. Updated about 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Frontend
Target version:
-
Start date:
2015-07-02
Due date:
% Done:

100%

PHP Version:
Tags:
Complexity:
easy
Sprint Focus:

Description

Currently the method process in FluidTemplateDataProcessorInterface looks like

public function process(
    array &$data, // $this->cObj->data
    array $processorConfiguration,
    array $configuration,
    StandaloneView $view
);

where $data is $this->cObj->data coming from FluidTemplateContentObject.

There are two issues with this:

1) The data processors currently written and in review are instantiating the ContentObjectRenderer ($this->cObj) again. This is overkill, since it is already available in FluidTemplateContentObject.

2) This variable is referenced, which makes it possible to influence $this->cObj->data. It is better to assign manipulated values to the view directly, instead of using $cObj->data. As an example: {data.bullets} should contain the non-manipulated data, {bullets} should contain the manipulated data.

3) The table name is desired in the data processors.

The proposal is to use $this->cObj from FluidTemplateContentObject in the method process of FluidTemplateDataProcessorInterface, like

public function process(
    array $cObj, // $this->cObj
    array $processorConfiguration,
    array $configuration,
    StandaloneView $view
);

This is breaking since we introduced the interface in version 7.3.0


Related issues

Related to TYPO3 Core - Feature #66907: Add possibility to the FLUIDTEMPLATE Content Object to do data processing before rendering Closed 2015-05-12
Related to TYPO3 Core - Task #68762: Document DataProcessorInterface for Fluid Template Closed 2015-08-05

Associated revisions

Revision d26b0a55 (diff)
Added by Benni Mack over 4 years ago

[!!!][TASK] Redesign FluidTemplateDataProcessorInterface

The FluidTemplateDataProcessorInterface introduced with #66907 has been
refactored to DataProcessorInterface.

This decouples it from the Fluid StandaloneView and makes the
ContentObjectRenderer available in the process method so the different
DataProcessor classes do no have to initiate it on their own.

Instead of manipulating the $data property of the ContentObjectRenderer
a new key/value store can be filled/manipulated by the different
dataProcessor classes.

Resolves: #67890
Releases: master
Change-Id: I461dbff039974715e2c8f916efd5d79c159cc8b5
Reviewed-on: http://review.typo3.org/40915
Reviewed-by: Benjamin Mack <>
Tested-by: Benjamin Mack <>
Reviewed-by: Wouter Wolters <>
Reviewed-by: Markus Klein <>
Reviewed-by: Helmut Hummel <>
Tested-by: Helmut Hummel <>

Revision 457f7b05 (diff)
Added by Frans Saris over 4 years ago

[FOLLOWUP][TASK] Redesign FluidTemplateDataProcessorInterface

Fixed wrong PHPDOC header.

Resolves: #67890
Releases: master
Change-Id: I21b3eedce60f28e8ef5efd4e5b0fb6ba7a645934
Reviewed-on: http://review.typo3.org/40950
Reviewed-by: Wouter Wolters <>
Tested-by: Wouter Wolters <>
Reviewed-by: Andreas Fernandez <>
Tested-by: Andreas Fernandez <>

History

#1 Updated by Patrick Broens over 4 years ago

  • Description updated (diff)

#2 Updated by Patrick Broens over 4 years ago

  • Description updated (diff)

#3 Updated by Gerrit Code Review over 4 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/40915

#4 Updated by Gerrit Code Review over 4 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/40915

#5 Updated by Gerrit Code Review over 4 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/40915

#6 Updated by Gerrit Code Review over 4 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/40915

#7 Updated by Gerrit Code Review over 4 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/40915

#8 Updated by Benni Mack over 4 years ago

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

#9 Updated by Gerrit Code Review over 4 years ago

  • Status changed from Resolved 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/40950

#10 Updated by Frans Saris over 4 years ago

  • Status changed from Under Review to Resolved

#11 Updated by Benni Mack about 1 year ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF