‪TYPO3CMS  9.5
TYPO3\CMS\Install\Updates\FrontendUserImageUpdateWizard Class Reference
Inheritance diagram for TYPO3\CMS\Install\Updates\FrontendUserImageUpdateWizard:
TYPO3\CMS\Install\Updates\UpgradeWizardInterface

Public Member Functions

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

Public Attributes

const RECORDS_PER_QUERY = 1000
 

Protected Member Functions

 init ()
 
array getRecordsFromTable ($limit)
 
 migrateField ($row)
 

Protected Attributes

ResourceStorage $storage
 
string $table = 'fe_users'
 
string $fieldToMigrate = 'image'
 
string $sourcePath = 'uploads/pics/'
 
string $targetPath = '_migrated/frontend_users/'
 
Registry $registry
 
string $registryNamespace = 'FrontendUserImageUpdateWizard'
 
array $recordOffset = array( )
 

Detailed Description

Upgrade wizard which goes through all files referenced in fe_users::image and creates sys_file records as well as sys_file_reference records for each hit.

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

Definition at line 35 of file FrontendUserImageUpdateWizard.php.

Member Function Documentation

◆ executeUpdate()

◆ getDescription()

string TYPO3\CMS\Install\Updates\FrontendUserImageUpdateWizard::getDescription ( )
Returns
‪string Longer description of this updater

Implements TYPO3\CMS\Install\Updates\UpgradeWizardInterface.

Definition at line 105 of file FrontendUserImageUpdateWizard.php.

◆ getIdentifier()

string TYPO3\CMS\Install\Updates\FrontendUserImageUpdateWizard::getIdentifier ( )
Returns
‪string Unique identifier of this updater

Implements TYPO3\CMS\Install\Updates\UpgradeWizardInterface.

Definition at line 89 of file FrontendUserImageUpdateWizard.php.

◆ getPrerequisites()

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

Implements TYPO3\CMS\Install\Updates\UpgradeWizardInterface.

Definition at line 126 of file FrontendUserImageUpdateWizard.php.

◆ getRecordsFromTable()

array TYPO3\CMS\Install\Updates\FrontendUserImageUpdateWizard::getRecordsFromTable (   $limit)
protected

Get records from table where the field to migrate is not empty (NOT NULL and != '') and also not numeric (which means that it is migrated)

Parameters
int$limit‪Maximum number records to select
Returns
‪array
Exceptions

Definition at line 180 of file FrontendUserImageUpdateWizard.php.

References TYPO3\CMS\Core\Database\Query\Expression\ExpressionBuilder\NEQ.

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

◆ getTitle()

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

Implements TYPO3\CMS\Install\Updates\UpgradeWizardInterface.

Definition at line 97 of file FrontendUserImageUpdateWizard.php.

◆ init()

TYPO3\CMS\Install\Updates\FrontendUserImageUpdateWizard::init ( )
protected

Initialize the storage repository.

Definition at line 164 of file FrontendUserImageUpdateWizard.php.

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

◆ migrateField()

◆ updateNecessary()

bool TYPO3\CMS\Install\Updates\FrontendUserImageUpdateWizard::updateNecessary ( )

Checks if an update is needed

Returns
‪bool TRUE if an update is needed, FALSE otherwise

Implements TYPO3\CMS\Install\Updates\UpgradeWizardInterface.

Definition at line 117 of file FrontendUserImageUpdateWizard.php.

Member Data Documentation

◆ $fieldToMigrate

string TYPO3\CMS\Install\Updates\FrontendUserImageUpdateWizard::$fieldToMigrate = 'image'
protected

Table field holding the migration to be

Definition at line 59 of file FrontendUserImageUpdateWizard.php.

Referenced by TYPO3\CMS\Install\Updates\FrontendUserImageUpdateWizard\migrateField().

◆ $recordOffset

array TYPO3\CMS\Install\Updates\FrontendUserImageUpdateWizard::$recordOffset = array( )
protected

Definition at line 84 of file FrontendUserImageUpdateWizard.php.

◆ $registry

Registry TYPO3\CMS\Install\Updates\FrontendUserImageUpdateWizard::$registry
protected

Definition at line 76 of file FrontendUserImageUpdateWizard.php.

◆ $registryNamespace

string TYPO3\CMS\Install\Updates\FrontendUserImageUpdateWizard::$registryNamespace = 'FrontendUserImageUpdateWizard'
protected

Definition at line 80 of file FrontendUserImageUpdateWizard.php.

◆ $sourcePath

string TYPO3\CMS\Install\Updates\FrontendUserImageUpdateWizard::$sourcePath = 'uploads/pics/'
protected

the source file resides here

Definition at line 65 of file FrontendUserImageUpdateWizard.php.

Referenced by TYPO3\CMS\Install\Updates\FrontendUserImageUpdateWizard\migrateField().

◆ $storage

ResourceStorage TYPO3\CMS\Install\Updates\FrontendUserImageUpdateWizard::$storage
protected

Definition at line 47 of file FrontendUserImageUpdateWizard.php.

◆ $table

string TYPO3\CMS\Install\Updates\FrontendUserImageUpdateWizard::$table = 'fe_users'
protected

◆ $targetPath

string TYPO3\CMS\Install\Updates\FrontendUserImageUpdateWizard::$targetPath = '_migrated/frontend_users/'
protected

target folder after migration Relative to fileadmin

Definition at line 72 of file FrontendUserImageUpdateWizard.php.

Referenced by TYPO3\CMS\Install\Updates\FrontendUserImageUpdateWizard\migrateField().

◆ RECORDS_PER_QUERY

const TYPO3\CMS\Install\Updates\FrontendUserImageUpdateWizard::RECORDS_PER_QUERY = 1000

Number of records fetched per database query Used to prevent memory overflows for huge databases

Definition at line 43 of file FrontendUserImageUpdateWizard.php.

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