Project

General

Profile

Actions

Story #76896

closed

Epic #76862: Refactor and modernise the TypoScript content renderer

Move stdWrap processing from ContentObjectRenderer into a separate class

Added by Elmar Hinz almost 8 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Code Cleanup
Target version:
-
Start date:
2016-06-30
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
8
PHP Version:
Tags:
Sprint Focus:

Description

To reduce the complexity of the giant class, move stdWrap processing from ContentObjectRenderer into a separate class.

Data types, functions and content objects are different parts of TypoScript. Following the principles of separation of concerns the different concerns should be moved out of ContentObjectRenderer step by step.

As stdWrap make a big part of ContentObjectRenderer let's start with this.

This is the plan:

  1. Adding unit test for stdWrap methods to create a safety net for the migration: Story #74496
  2. Creating a dedicated class for stdWrap and set up the initial infrastructure, tests etc.
  3. Moving the stdWrap methods step by step.
  4. Moving the rest of the stdWrap functionality.

Once the split into two classes is done, it's to consider to make every stdWrap a dedicated class: #68733

Challenge:

Both classes need to share a common data model. This is the current $data array of ContentObjectRenderer. The first idea may be, to use a reference, but as this property is public it may be changed from outside, what would break a reference.

A clean object orientated approach would be, to make the internal data representation of the ContentObjectRenderer private, maybe using an object, that is shared between both classes.

For the beginning a data access method will do. instead of working on a reference it will question the original property each time it is called.

The final solution still needs research.

Actions

Also available in: Atom PDF