‪TYPO3CMS  10.4
TYPO3\CMS\Core\Migrations\TcaMigration Class Reference

Public Member Functions

array migrate (array $tca)
 
array getMessages ()
 

Protected Member Functions

 validateTcaType (array $tca)
 
array migrateColumnsConfig (array $tca)
 
array migrateLocalizeChildrenAtParentLocalization (array $tca)
 
array migratePagesLanguageOverlayRemoval (array $tca)
 
array removeEnableMultiSelectFilterTextfieldConfiguration (array $tca)
 
array removeSelIconFieldPath (array $tca)
 
array removeSetToDefaultOnCopy (array $tca)
 
array sanitizeControlSectionIntegrity (array $tca)
 
array removeExcludeFieldForTransOrigPointerField (array $tca)
 
array removeShowRecordFieldListField (array $tca)
 
array migrateSelectAuthModeIndividualItemsKeywordToNewPosition (array $tca)
 

Protected Attributes

array $messages = array( )
 

Detailed Description

Migrate TCA from old to new syntax. Used in bootstrap and Flex Form Data Structures.

Class and API may change any time.

Definition at line 25 of file TcaMigration.php.

Member Function Documentation

◆ getMessages()

array TYPO3\CMS\Core\Migrations\TcaMigration::getMessages ( )

Get messages of migrated fields. Can be used for deprecation messages after migrate() was called.

Returns
‪array Migration messages

Definition at line 69 of file TcaMigration.php.

References TYPO3\CMS\Core\Migrations\TcaMigration\$messages.

◆ migrate()

◆ migrateColumnsConfig()

array TYPO3\CMS\Core\Migrations\TcaMigration::migrateColumnsConfig ( array  $tca)
protected

Find columns fields that don't have a 'config' section at all, add ['config']['type'] = 'none'; for those to enforce config

Parameters
array$tca‪Incoming TCA
Returns
‪array

Definition at line 103 of file TcaMigration.php.

References $tca.

Referenced by TYPO3\CMS\Core\Migrations\TcaMigration\migrate().

◆ migrateLocalizeChildrenAtParentLocalization()

array TYPO3\CMS\Core\Migrations\TcaMigration::migrateLocalizeChildrenAtParentLocalization ( array  $tca)
protected

Option $TCA[$table]['columns'][$columnName]['config']['behaviour']['localizeChildrenAtParentLocalization'] is always on, so this option can be removed.

Parameters
array$tca
Returns
‪array the modified TCA structure

Definition at line 130 of file TcaMigration.php.

References $tca.

Referenced by TYPO3\CMS\Core\Migrations\TcaMigration\migrate().

◆ migratePagesLanguageOverlayRemoval()

array TYPO3\CMS\Core\Migrations\TcaMigration::migratePagesLanguageOverlayRemoval ( array  $tca)
protected

Removes $TCA['pages_language_overlay'] if defined.

Parameters
array$tca
Returns
‪array the modified TCA structure

Definition at line 168 of file TcaMigration.php.

References $tca.

Referenced by TYPO3\CMS\Core\Migrations\TcaMigration\migrate().

◆ migrateSelectAuthModeIndividualItemsKeywordToNewPosition()

array TYPO3\CMS\Core\Migrations\TcaMigration::migrateSelectAuthModeIndividualItemsKeywordToNewPosition ( array  $tca)
protected

If a column has authMode=individual and items with the corresponding key on position 5 defined, migrate the key to position 6, since position 5 is used for the description.

Parameters
array$tca
Returns
‪array

Definition at line 338 of file TcaMigration.php.

References $tca.

Referenced by TYPO3\CMS\Core\Migrations\TcaMigration\migrate().

◆ removeEnableMultiSelectFilterTextfieldConfiguration()

array TYPO3\CMS\Core\Migrations\TcaMigration::removeEnableMultiSelectFilterTextfieldConfiguration ( array  $tca)
protected

Removes configuration removeEnableMultiSelectFilterTextfield

Parameters
array$tca
Returns
‪array the modified TCA structure

Definition at line 189 of file TcaMigration.php.

References $tca.

Referenced by TYPO3\CMS\Core\Migrations\TcaMigration\migrate().

◆ removeExcludeFieldForTransOrigPointerField()

array TYPO3\CMS\Core\Migrations\TcaMigration::removeExcludeFieldForTransOrigPointerField ( array  $tca)
protected

Removes $TCA[$mytable][columns][transOrigPointerField][exclude] if defined

Parameters
array$tca
Returns
‪array

Definition at line 291 of file TcaMigration.php.

Referenced by TYPO3\CMS\Core\Migrations\TcaMigration\migrate().

◆ removeSelIconFieldPath()

array TYPO3\CMS\Core\Migrations\TcaMigration::removeSelIconFieldPath ( array  $tca)
protected

Removes $TCA[$mytable][ctrl][selicon_field_path]

Parameters
array$tca
Returns
‪array the modified TCA structure

Definition at line 215 of file TcaMigration.php.

References $tca.

Referenced by TYPO3\CMS\Core\Migrations\TcaMigration\migrate().

◆ removeSetToDefaultOnCopy()

array TYPO3\CMS\Core\Migrations\TcaMigration::removeSetToDefaultOnCopy ( array  $tca)
protected

Removes $TCA[$mytable][ctrl][setToDefaultOnCopy]

Parameters
array$tca
Returns
‪array the modified TCA structure

Definition at line 234 of file TcaMigration.php.

Referenced by TYPO3\CMS\Core\Migrations\TcaMigration\migrate().

◆ removeShowRecordFieldListField()

array TYPO3\CMS\Core\Migrations\TcaMigration::removeShowRecordFieldListField ( array  $tca)
protected

Removes $TCA[$mytable]['interface']['showRecordFieldList'] and also $TCA[$mytable]['interface'] if showRecordFieldList was the only key in the array.

Parameters
array$tca
Returns
‪array

Definition at line 314 of file TcaMigration.php.

Referenced by TYPO3\CMS\Core\Migrations\TcaMigration\migrate().

◆ sanitizeControlSectionIntegrity()

array TYPO3\CMS\Core\Migrations\TcaMigration::sanitizeControlSectionIntegrity ( array  $tca)
protected

Ensures that system internal columns that are required for data integrity (e.g. localize or copy a record) are available in case they have been defined in $GLOBALS['TCA'][<table-name>]['ctrl'].

The list of references to usages below is not necessarily complete.

Parameters
array$tca
Returns
‪array
See also
‪\TYPO3\CMS\Core\DataHandling\DataHandler::fillInFieldArray()

Definition at line 259 of file TcaMigration.php.

Referenced by TYPO3\CMS\Core\Migrations\TcaMigration\migrate().

◆ validateTcaType()

TYPO3\CMS\Core\Migrations\TcaMigration::validateTcaType ( array  $tca)
protected

Check for required TCA configuration

Parameters
array$tca‪Incoming TCA

Definition at line 79 of file TcaMigration.php.

References $tca.

Referenced by TYPO3\CMS\Core\Migrations\TcaMigration\migrate().

Member Data Documentation

◆ $messages

array TYPO3\CMS\Core\Migrations\TcaMigration::$messages = array( )
protected

Accumulate migration messages

Definition at line 31 of file TcaMigration.php.

Referenced by TYPO3\CMS\Core\Migrations\TcaMigration\getMessages().