‪TYPO3CMS  ‪main
TYPO3\CMS\Install\Updates\RowUpdater\WorkspaceNewPlaceholderRemovalMigration Class Reference
Inheritance diagram for TYPO3\CMS\Install\Updates\RowUpdater\WorkspaceNewPlaceholderRemovalMigration:
TYPO3\CMS\Install\Updates\RowUpdater\RowUpdaterInterface

Public Member Functions

 getTitle ()
 
bool hasPotentialUpdateForTable (string $tableName)
 
 updateTableRow (string $tableName, array $row)
 

Protected Member Functions

array null fetchVersionedRecord (string $tableName, int $uid)
 
 isMMField (string $tableName, string $fieldName)
 
 transferMMValues (string $tableName, string $fieldName, int $originalUid, int $newUid)
 

Detailed Description

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.

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

Definition at line 43 of file WorkspaceNewPlaceholderRemovalMigration.php.

Member Function Documentation

◆ fetchVersionedRecord()

array null TYPO3\CMS\Install\Updates\RowUpdater\WorkspaceNewPlaceholderRemovalMigration::fetchVersionedRecord ( string  $tableName,
int  $uid 
)
protected

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

Returns
‪array|null the versioned record or null if none was found.

Definition at line 93 of file WorkspaceNewPlaceholderRemovalMigration.php.

References TYPO3\CMS\Webhooks\Message\$uid, and TYPO3\CMS\Core\Database\Connection\PARAM_INT.

Referenced by TYPO3\CMS\Install\Updates\RowUpdater\WorkspaceNewPlaceholderRemovalMigration\updateTableRow().

◆ getTitle()

TYPO3\CMS\Install\Updates\RowUpdater\WorkspaceNewPlaceholderRemovalMigration::getTitle ( )

Get a description of this single row updater

Implements TYPO3\CMS\Install\Updates\RowUpdater\RowUpdaterInterface.

Definition at line 47 of file WorkspaceNewPlaceholderRemovalMigration.php.

◆ hasPotentialUpdateForTable()

bool TYPO3\CMS\Install\Updates\RowUpdater\WorkspaceNewPlaceholderRemovalMigration::hasPotentialUpdateForTable ( string  $tableName)
Parameters
string$tableName‪Table name to check
Returns
‪bool Return true if a table has workspace enabled

Implements TYPO3\CMS\Install\Updates\RowUpdater\RowUpdaterInterface.

Definition at line 56 of file WorkspaceNewPlaceholderRemovalMigration.php.

◆ isMMField()

TYPO3\CMS\Install\Updates\RowUpdater\WorkspaceNewPlaceholderRemovalMigration::isMMField ( string  $tableName,
string  $fieldName 
)
protected

◆ transferMMValues()

TYPO3\CMS\Install\Updates\RowUpdater\WorkspaceNewPlaceholderRemovalMigration::transferMMValues ( string  $tableName,
string  $fieldName,
int  $originalUid,
int  $newUid 
)
protected

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.

Definition at line 126 of file WorkspaceNewPlaceholderRemovalMigration.php.

References $GLOBALS, and TYPO3\CMS\Core\Database\Connection\PARAM_INT.

Referenced by TYPO3\CMS\Install\Updates\RowUpdater\WorkspaceNewPlaceholderRemovalMigration\updateTableRow().

◆ updateTableRow()

TYPO3\CMS\Install\Updates\RowUpdater\WorkspaceNewPlaceholderRemovalMigration::updateTableRow ( string  $tableName,
array  $row 
)