WorkspaceNewPlaceholderRemovalMigration implements RowUpdaterInterface, LoggerAwareInterface uses LoggerAwareTrait

TYPO3 v11 does not need a "versioned" / "placeholder" pair for newly created records in a version anymore.

This upgrade wizards merges those records pairs into one record.

The strategy is to keep the t3ver_state=1 record and to merge "payload" fields data like "header / bodytext" and so on from the t3ver_state=-1 record over to the t3ver_state=1 records. The t3ver_state=-1 record is then deleted (or marked as deleted if the table is soft-delete aware).

For relations, this is a bit more tricky. When dealing with CSV and ForeignField relations, existing relations are connected to the t3ver_state=1 record. This is fine. For MM relations, they point to the t3ver_state=-1 record, though. The implementation thus finds and updates those MM relations.

Internal

This class is only meant to be used within EXT:install and is not part of the TYPO3 Core API.

Table of Contents

Interfaces

RowUpdaterInterface
Interface each single row updater must implement.
LoggerAwareInterface

Methods

getTitle()  : string
Get a description of this single row updater
hasPotentialUpdateForTable()  : bool
Return true if this row updater may have updates for given table rows.
updateTableRow()  : array<string|int, mixed>
Update a single row from a table.
fetchVersionedRecord()  : array<string|int, mixed>|null
Fetch the t3ver_state = -1 record for a given t3ver_state = 1 record.
isMMField()  : bool
transferMMValues()  : void
Because MM does not contain workspace information, they were previously bound directly to the versioned record, this information is now transferred to the new version t3ver_state=1 record.

Methods

getTitle()

Get a description of this single row updater

public getTitle() : string
Return values
string

hasPotentialUpdateForTable()

Return true if this row updater may have updates for given table rows.

public hasPotentialUpdateForTable(string $tableName) : bool
Parameters
$tableName : string

Table name to check

Return values
bool

Return true if a table has workspace enabled

updateTableRow()

Update a single row from a table.

public updateTableRow(string $tableName, array<string|int, mixed> $row) : array<string|int, mixed>
Parameters
$tableName : string

Given table

$row : array<string|int, mixed>

Given row

Return values
array<string|int, mixed>

Potentially modified row

fetchVersionedRecord()

Fetch the t3ver_state = -1 record for a given t3ver_state = 1 record.

protected fetchVersionedRecord(string $tableName, int $uid) : array<string|int, mixed>|null
Parameters
$tableName : string
$uid : int
Return values
array<string|int, mixed>|null

the versioned record or null if none was found.

isMMField()

protected isMMField(string $tableName, string $fieldName) : bool
Parameters
$tableName : string
$fieldName : string
Return values
bool

transferMMValues()

Because MM does not contain workspace information, they were previously bound directly to the versioned record, this information is now transferred to the new version t3ver_state=1 record.

protected transferMMValues(string $tableName, string $fieldName, int $originalUid, int $newUid) : void
Parameters
$tableName : string
$fieldName : string
$originalUid : int
$newUid : int

        
On this page

Search results