[!!!][TASK] Redesign FluidTemplateDataProcessorInterface
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / Documentation / Changelog / master / Breaking-67890-RedesignFluidTemplateDataProcessorInterfaceToDataProcessorInterface.rst
1 =========================================================================================
2 Breaking: #67890 - Redesign FluidTemplateDataProcessorInterface to DataProcessorInterface
3 =========================================================================================
4
5 Description
6 ===========
7
8 The ``FluidTemplateDataProcessorInterface`` introduced with #66907 has been refactored to ``DataProcessorInterface``.
9
10 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.
11 Instead of manipulating the $data property of the ContentObjectRenderer a new key/value store can be filled/manipulated by the different dataProcessor classes.
12
13 The new interface expects the following ``process()`` method:
14
15 .. code-block:: php
16
17 /**
18 * Process content object data
19 *
20 * @param ContentObjectRenderer $cObj The data of the content element or page
21 * @param array $processorConfiguration The configuration of this processor
22 * @param array $contentObjectConfiguration The configuration of Content Object
23 * @param array $processedData Key/value store of processed data (e.g. to be passed to a Fluid View)
24 * @return array the processed data as key/value store
25 */
26 public function process(
27 ContentObjectRenderer $cObj,
28 array $contentObjectConfiguration,
29 array $processorConfiguration,
30 array $processedData
31 );
32
33
34 Impact
35 ======
36
37 This will break all frontend rendering for TYPO3 7.3 installations that use ``FLUIDTEMPLATE`` ``.dataProcessing``.
38
39
40 Affected Installations
41 ======================
42
43 All TYPO3 7.3 installations that already use the new ``FLUIDTEMPLATE`` ``.dataProcessing`` option.
44
45
46 Migration
47 =========
48
49 Change the interface of all DataProcessor classes from ``FluidTemplateDataProcessorInterface`` to the new ``DataProcessorInterface`` and adjust the ``process()`` method to match the new parameters and make sure it returns the processed data as the processed data.