‪TYPO3CMS  ‪main
TYPO3\CMS\Install\Updates\DatabaseRowsUpdateWizard Class Reference
Inheritance diagram for TYPO3\CMS\Install\Updates\DatabaseRowsUpdateWizard:
TYPO3\CMS\Install\Updates\UpgradeWizardInterface TYPO3\CMS\Install\Updates\RepeatableInterface

Public Member Functions

string[] getAvailableRowUpdater ()
 
string getTitle ()
 
string getDescription ()
 
bool updateNecessary ()
 
string[] getPrerequisites ()
 
 executeUpdate ()
 

Protected Member Functions

array getRowUpdatersToExecute ()
 
 setRowUpdaterExecuted (RowUpdaterInterface $updater)
 
array getStartPosition (string $firstTable)
 
 updateOrDeleteRow (Connection $connectionForTable, Connection $connectionForSysRegistry, string $table, int $uid, array $updatedFields, array $startPosition)
 

Protected Attributes

array $rowUpdater
 

Detailed Description

This is a generic updater to migrate content of TCA rows.

Multiple classes implementing interface "RowUpdateInterface" can be registered here, each for a specific update purpose.

The updater fetches each row of all TCA registered tables and visits the client classes who may modify the row content.

The updater remembers for each class if it run through, so the updater will be shown again if a new updater class is registered that has not been run yet.

A start position pointer is stored in the registry that is updated during the run process, so if for instance the PHP process runs into a timeout, the job can restart at the position it stopped.

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

Definition at line 47 of file DatabaseRowsUpdateWizard.php.

Member Function Documentation

◆ executeUpdate()

◆ getAvailableRowUpdater()

string [] TYPO3\CMS\Install\Updates\DatabaseRowsUpdateWizard::getAvailableRowUpdater ( )
Returns
‪string[]

Definition at line 59 of file DatabaseRowsUpdateWizard.php.

References TYPO3\CMS\Install\Updates\DatabaseRowsUpdateWizard\$rowUpdater.

◆ getDescription()

string TYPO3\CMS\Install\Updates\DatabaseRowsUpdateWizard::getDescription ( )

◆ getPrerequisites()

string [] TYPO3\CMS\Install\Updates\DatabaseRowsUpdateWizard::getPrerequisites ( )
Returns
‪string[] All new fields and tables must exist

Implements TYPO3\CMS\Install\Updates\UpgradeWizardInterface.

Definition at line 104 of file DatabaseRowsUpdateWizard.php.

◆ getRowUpdatersToExecute()

array TYPO3\CMS\Install\Updates\DatabaseRowsUpdateWizard::getRowUpdatersToExecute ( )
protected

◆ getStartPosition()

array TYPO3\CMS\Install\Updates\DatabaseRowsUpdateWizard::getStartPosition ( string  $firstTable)
protected

Return an array with table / uid combination that specifies the start position the update row process should start with.

Parameters
string$firstTable‪Table name of the first TCA in case the start position needs to be initialized
Returns
‪array New start position

Definition at line 288 of file DatabaseRowsUpdateWizard.php.

Referenced by TYPO3\CMS\Install\Updates\DatabaseRowsUpdateWizard\executeUpdate().

◆ getTitle()

string TYPO3\CMS\Install\Updates\DatabaseRowsUpdateWizard::getTitle ( )
Returns
‪string Title of this updater

Implements TYPO3\CMS\Install\Updates\UpgradeWizardInterface.

Definition at line 67 of file DatabaseRowsUpdateWizard.php.

◆ setRowUpdaterExecuted()

TYPO3\CMS\Install\Updates\DatabaseRowsUpdateWizard::setRowUpdaterExecuted ( RowUpdaterInterface  $updater)
protected

Mark a single updater as done

Definition at line 273 of file DatabaseRowsUpdateWizard.php.

Referenced by TYPO3\CMS\Install\Updates\DatabaseRowsUpdateWizard\executeUpdate().

◆ updateNecessary()

bool TYPO3\CMS\Install\Updates\DatabaseRowsUpdateWizard::updateNecessary ( )
Returns
‪bool True if at least one row updater is not marked done

Implements TYPO3\CMS\Install\Updates\UpgradeWizardInterface.

Definition at line 96 of file DatabaseRowsUpdateWizard.php.

References TYPO3\CMS\Install\Updates\DatabaseRowsUpdateWizard\getRowUpdatersToExecute().

◆ updateOrDeleteRow()

TYPO3\CMS\Install\Updates\DatabaseRowsUpdateWizard::updateOrDeleteRow ( Connection  $connectionForTable,
Connection  $connectionForSysRegistry,
string  $table,
int  $uid,
array  $updatedFields,
array  $startPosition 
)
protected

Member Data Documentation

◆ $rowUpdater

array TYPO3\CMS\Install\Updates\DatabaseRowsUpdateWizard::$rowUpdater
protected