TcaMigration

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

Internal

Class and API may change any time.

Table of Contents

Properties

$messages  : array<string|int, mixed>
Accumulate migration messages

Methods

getMessages()  : array<string|int, mixed>
Get messages of migrated fields. Can be used for deprecation messages after migrate() was called.
migrate()  : array<string|int, mixed>
Run some general TCA validations, then migrate old TCA to new TCA.
migrateColumnsConfig()  : array<string|int, mixed>
Find columns fields that don't have a 'config' section at all, add ['config']['type'] = 'none'; for those to enforce config
migrateFileFolderConfiguration()  : array<string|int, mixed>
Moves the "fileFolder" configuration of TCA columns type=select into sub array "fileFolderConfig", while renaming those options.
migrateLanguageFieldToTcaTypeLanguage()  : array<string|int, mixed>
Replaces $TCA[$mytable][columns][$TCA[$mytable][ctrl][languageField]][config] with $TCA[$mytable][columns][$TCA[$mytable][ctrl][languageField]][config][type] = 'language'
migrateLevelLinksPosition()  : array<string|int, mixed>
The [appearance][levelLinksPosition] option can be used to select the position of the level links. This option was previously misused to disable all those links by setting it to "none". Since all of those links can be disabled by a dedicated option, e.g. showNewRecordLink, this wizard sets those options to false and unsets the invalid levelLinksPosition value.
migrateLocalizeChildrenAtParentLocalization()  : array<string|int, mixed>
Option $TCA[$table]['columns'][$columnName]['config']['behaviour']['localizeChildrenAtParentLocalization'] is always on, so this option can be removed.
migratePagesLanguageOverlayRemoval()  : array<string|int, mixed>
Removes $TCA['pages_language_overlay'] if defined.
migrateRootUidToStartingPoints()  : array<string|int, mixed>
If a column has [treeConfig][rootUid] defined, migrate to [treeConfig][startingPoints] on the same level.
migrateSelectAuthModeIndividualItemsKeywordToNewPosition()  : array<string|int, mixed>
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.
migrateSpecialLanguagesToTcaTypeLanguage()  : array<string|int, mixed>
Replaces $TCA[$mytable][columns][field][config][special] = 'languages' with $TCA[$mytable][columns][field][config][type] = 'language'
removeEnableMultiSelectFilterTextfieldConfiguration()  : array<string|int, mixed>
Removes configuration removeEnableMultiSelectFilterTextfield
removeExcludeFieldForTransOrigPointerField()  : array<string|int, mixed>
Removes $TCA[$mytable][columns][_transOrigPointerField_][exclude] if defined
removeSelIconFieldPath()  : array<string|int, mixed>
Removes $TCA[$mytable][ctrl][selicon_field_path]
removeSetToDefaultOnCopy()  : array<string|int, mixed>
Removes $TCA[$mytable][ctrl][setToDefaultOnCopy]
removeShowRecordFieldListField()  : array<string|int, mixed>
Removes $TCA[$mytable]['interface']['showRecordFieldList'] and also $TCA[$mytable]['interface'] if `showRecordFieldList` was the only key in the array.
removeShowRemovedLocalizationRecords()  : array<string|int, mixed>
removeWorkspacePlaceholderShadowColumnsConfiguration()  : array<string|int, mixed>
Removes $TCA[$mytable][ctrl][shadowColumnsForMovePlaceholders] and $TCA[$mytable][ctrl][shadowColumnsForNewPlaceholders]
sanitizeControlSectionIntegrity()  : array<string|int, mixed>
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'].
validateTcaType()  : mixed
Check for required TCA configuration

Properties

$messages

Accumulate migration messages

protected array<string|int, mixed> $messages = []

Methods

getMessages()

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

public getMessages() : array<string|int, mixed>
Return values
array<string|int, mixed>

Migration messages

migrate()

Run some general TCA validations, then migrate old TCA to new TCA.

public migrate(array<string|int, mixed> $tca) : array<string|int, mixed>

This class is typically called within bootstrap with empty caches after all TCA files from extensions have been loaded. The migration is then applied and the migrated result is cached. For flex form TCA, this class is called dynamically if opening a record in the backend.

See unit tests for details.

Parameters
$tca : array<string|int, mixed>
Return values
array<string|int, mixed>

migrateColumnsConfig()

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

protected migrateColumnsConfig(array<string|int, mixed> $tca) : array<string|int, mixed>
Parameters
$tca : array<string|int, mixed>

Incoming TCA

Return values
array<string|int, mixed>

migrateFileFolderConfiguration()

Moves the "fileFolder" configuration of TCA columns type=select into sub array "fileFolderConfig", while renaming those options.

protected migrateFileFolderConfiguration(array<string|int, mixed> $tca) : array<string|int, mixed>
Parameters
$tca : array<string|int, mixed>
Return values
array<string|int, mixed>

migrateLanguageFieldToTcaTypeLanguage()

Replaces $TCA[$mytable][columns][$TCA[$mytable][ctrl][languageField]][config] with $TCA[$mytable][columns][$TCA[$mytable][ctrl][languageField]][config][type] = 'language'

protected migrateLanguageFieldToTcaTypeLanguage(array<string|int, mixed> $tca) : array<string|int, mixed>
Parameters
$tca : array<string|int, mixed>
Return values
array<string|int, mixed>

migrateLevelLinksPosition()

The [appearance][levelLinksPosition] option can be used to select the position of the level links. This option was previously misused to disable all those links by setting it to "none". Since all of those links can be disabled by a dedicated option, e.g. showNewRecordLink, this wizard sets those options to false and unsets the invalid levelLinksPosition value.

protected migrateLevelLinksPosition(array<string|int, mixed> $tca) : array<string|int, mixed>
Parameters
$tca : array<string|int, mixed>
Return values
array<string|int, mixed>

migrateLocalizeChildrenAtParentLocalization()

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

protected migrateLocalizeChildrenAtParentLocalization(array<string|int, mixed> $tca) : array<string|int, mixed>
Parameters
$tca : array<string|int, mixed>
Return values
array<string|int, mixed>

the modified TCA structure

migratePagesLanguageOverlayRemoval()

Removes $TCA['pages_language_overlay'] if defined.

protected migratePagesLanguageOverlayRemoval(array<string|int, mixed> $tca) : array<string|int, mixed>
Parameters
$tca : array<string|int, mixed>
Return values
array<string|int, mixed>

the modified TCA structure

migrateRootUidToStartingPoints()

If a column has [treeConfig][rootUid] defined, migrate to [treeConfig][startingPoints] on the same level.

protected migrateRootUidToStartingPoints(array<string|int, mixed> $tca) : array<string|int, mixed>
Parameters
$tca : array<string|int, mixed>
Return values
array<string|int, mixed>

migrateSelectAuthModeIndividualItemsKeywordToNewPosition()

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.

protected migrateSelectAuthModeIndividualItemsKeywordToNewPosition(array<string|int, mixed> $tca) : array<string|int, mixed>
Parameters
$tca : array<string|int, mixed>
Return values
array<string|int, mixed>

migrateSpecialLanguagesToTcaTypeLanguage()

Replaces $TCA[$mytable][columns][field][config][special] = 'languages' with $TCA[$mytable][columns][field][config][type] = 'language'

protected migrateSpecialLanguagesToTcaTypeLanguage(array<string|int, mixed> $tca) : array<string|int, mixed>
Parameters
$tca : array<string|int, mixed>
Return values
array<string|int, mixed>

removeEnableMultiSelectFilterTextfieldConfiguration()

Removes configuration removeEnableMultiSelectFilterTextfield

protected removeEnableMultiSelectFilterTextfieldConfiguration(array<string|int, mixed> $tca) : array<string|int, mixed>
Parameters
$tca : array<string|int, mixed>
Return values
array<string|int, mixed>

the modified TCA structure

removeExcludeFieldForTransOrigPointerField()

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

protected removeExcludeFieldForTransOrigPointerField(array<string|int, mixed> $tca) : array<string|int, mixed>
Parameters
$tca : array<string|int, mixed>
Return values
array<string|int, mixed>

removeSelIconFieldPath()

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

protected removeSelIconFieldPath(array<string|int, mixed> $tca) : array<string|int, mixed>
Parameters
$tca : array<string|int, mixed>
Return values
array<string|int, mixed>

the modified TCA structure

removeSetToDefaultOnCopy()

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

protected removeSetToDefaultOnCopy(array<string|int, mixed> $tca) : array<string|int, mixed>
Parameters
$tca : array<string|int, mixed>
Return values
array<string|int, mixed>

the modified TCA structure

removeShowRecordFieldListField()

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

protected removeShowRecordFieldListField(array<string|int, mixed> $tca) : array<string|int, mixed>
Parameters
$tca : array<string|int, mixed>
Return values
array<string|int, mixed>

removeShowRemovedLocalizationRecords()

protected removeShowRemovedLocalizationRecords(array<string|int, mixed> $tca) : array<string|int, mixed>
Parameters
$tca : array<string|int, mixed>
Return values
array<string|int, mixed>

removeWorkspacePlaceholderShadowColumnsConfiguration()

Removes $TCA[$mytable][ctrl][shadowColumnsForMovePlaceholders] and $TCA[$mytable][ctrl][shadowColumnsForNewPlaceholders]

protected removeWorkspacePlaceholderShadowColumnsConfiguration(array<string|int, mixed> $tca) : array<string|int, mixed>
Parameters
$tca : array<string|int, mixed>
Return values
array<string|int, mixed>

the modified TCA structure

sanitizeControlSectionIntegrity()

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'].

protected sanitizeControlSectionIntegrity(array<string|int, mixed> $tca) : array<string|int, mixed>

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

Parameters
$tca : array<string|int, mixed>
Tags
see
DataHandler::fillInFieldArray()
Return values
array<string|int, mixed>

validateTcaType()

Check for required TCA configuration

protected validateTcaType(array<string|int, mixed> $tca) : mixed
Parameters
$tca : array<string|int, mixed>

Incoming TCA


        
On this page

Search results