TYPO3  7.6
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
TcaMigration Class Reference

Public Member Functions

 migrate (array $tca)
 
 getMessages ()
 
 migrateSelectFieldRenderType (array $tca)
 
 migrateSelectFieldIconTable (array $tca)
 

Protected Member Functions

 migrateT3editorWizardToRenderTypeT3editorIfNotEnabledByTypeConfig (array $tca)
 
 migrateSpecialConfigurationAndRemoveShowItemStylePointerConfig (array $tca)
 
 migrateT3editorWizardWithEnabledByTypeConfigToColumnsOverrides (array $tca)
 
 migrateShowItemAdditionalPaletteToOwnPalette (array $tca)
 
 migrateIconsForFormFieldWizardsToNewLocation (array $tca)
 
 migrateExtAndSysextPathToEXTPath (array $tca)
 
 migrateIconsInOptionTags (array $tca)
 
 migrateIconfileRelativePathOrFilenameOnlyToExtReference (array $tca)
 
 migrateElementBrowserWizardToLinkHandler (array $tca)
 

Protected Attributes

 $messages = array()
 

Detailed Description

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

Definition at line 25 of file TcaMigration.php.

Member Function Documentation

getMessages ( )

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

Returns
array Migration messages

Definition at line 64 of file TcaMigration.php.

References TcaMigration\$messages.

migrate ( array  $tca)
migrateElementBrowserWizardToLinkHandler ( array  $tca)
protected

Migrate wizard "wizard_element_browser" used in mode "wizard" to use the "wizard_link" instead

Parameters
array$tca
Returns
array Migrated TCA

Definition at line 623 of file TcaMigration.php.

References $tca.

Referenced by TcaMigration\migrate().

migrateExtAndSysextPathToEXTPath ( array  $tca)
protected

Migrate file reference which starts with ext/ or sysext/ to EXT:

Parameters
array$tcaIncoming TCA
Returns
array Migrated TCA

Definition at line 418 of file TcaMigration.php.

References $tca, StringUtility\beginsWith(), elseif, and GeneralUtility\trimExplode().

Referenced by TcaMigration\migrate().

migrateIconfileRelativePathOrFilenameOnlyToExtReference ( array  $tca)
protected

Migrate "iconfile" references which starts with ../ to EXT: and consisting of filename only to absolute paths in EXT:t3skin

Parameters
array$tcaIncoming TCA
Returns
array Migrated TCA

Definition at line 489 of file TcaMigration.php.

References $tca, StringUtility\beginsWith(), and elseif.

Referenced by TcaMigration\migrate().

migrateIconsForFormFieldWizardsToNewLocation ( array  $tca)
protected

Migrate core icons for form field wizard to new location

add.gif => EXT:backend/Resources/Public/Images/FormFieldWizard/wizard_add.gif link_popup.gif => EXT:backend/Resources/Public/Images/FormFieldWizard/wizard_link.gif wizard_rte2.gif => EXT:backend/Resources/Public/Images/FormFieldWizard/wizard_rte.gif wizard_table.gif => EXT:backend/Resources/Public/Images/FormFieldWizard/wizard_table.gif edit2.gif => EXT:backend/Resources/Public/Images/FormFieldWizard/wizard_edit.gif list.gif => EXT:backend/Resources/Public/Images/FormFieldWizard/wizard_list.gif wizard_forms.gif => EXT:backend/Resources/Public/Images/FormFieldWizard/wizard_forms.gif

Parameters
array$tcaIncoming TCA
Returns
array Migrated TCA

Definition at line 360 of file TcaMigration.php.

References $tca.

Referenced by TcaMigration\migrate().

migrateIconsInOptionTags ( array  $tca)
protected

Migrate "iconsInOptionTags" for "select" TCA fields

Parameters
array$tcaIncoming TCA
Returns
array Migrated TCA

Definition at line 464 of file TcaMigration.php.

References $tca.

Referenced by TcaMigration\migrate().

migrateSelectFieldIconTable ( array  $tca)

Migrate the visibility of the icon table for fields with "renderType=selectSingle"

Parameters
array$tca
Returns
array Migrated TCA

Definition at line 578 of file TcaMigration.php.

References $tca.

Referenced by TcaMigration\migrate().

migrateSelectFieldRenderType ( array  $tca)

Migrate "type=select" with "renderMode=[tree|singlebox|checkbox]" to "renderType=[selectTree|selectSingleBox|selectCheckBox]". This migration also take care of "maxitems" settings and set "renderType=[selectSingle|selectMultipleSideBySide]" if no other renderType is already set.

Parameters
array$tca
Returns
array

Definition at line 519 of file TcaMigration.php.

References $tca.

Referenced by TcaMigration\migrate().

migrateShowItemAdditionalPaletteToOwnPalette ( array  $tca)
protected

Migrate types showitem 'aField;aLabel;aPalette' to 'afield;aLabel, –palette–;;aPalette'

Old showitem can have a syntax like: fieldName;aLabel;aPalette This way, the palette with name "aPalette" is rendered after fieldName. The migration parses this to a syntax like: fieldName;aLabel, –palette–;;paletteName

Parameters
array$tcaIncoming TCA
Returns
array Migrated TCA

Definition at line 300 of file TcaMigration.php.

References $tca, and GeneralUtility\trimExplode().

Referenced by TcaMigration\migrate().

migrateSpecialConfigurationAndRemoveShowItemStylePointerConfig ( array  $tca)
protected

Remove "style pointer", the 5th parameter from "types" "showitem" configuration. Move "specConf", 4th parameter from "tyes" "showitem" to "types" "columnsOverrides.

Parameters
array$tcaIncoming TCA
Returns
array Modified TCA

Definition at line 126 of file TcaMigration.php.

References $tca, and GeneralUtility\trimExplode().

Referenced by TcaMigration\migrate().

migrateT3editorWizardToRenderTypeT3editorIfNotEnabledByTypeConfig ( array  $tca)
protected

Migrate type=text field with t3editor wizard to renderType=t3editor without this wizard

Parameters
array$tcaIncoming TCA
Returns
array Migrated TCA

Definition at line 75 of file TcaMigration.php.

References $tca.

Referenced by TcaMigration\migrate().

migrateT3editorWizardWithEnabledByTypeConfigToColumnsOverrides ( array  $tca)
protected

Migrate type=text field with t3editor wizard that is "enableByTypeConfig" to columnsOverrides with renderType=t3editor

Parameters
array$tcaIncoming TCA
Returns
array Migrated TCA

Definition at line 202 of file TcaMigration.php.

References $tca, and GeneralUtility\trimExplode().

Referenced by TcaMigration\migrate().

Member Data Documentation

$messages = array()
protected

Definition at line 32 of file TcaMigration.php.

Referenced by TcaMigration\getMessages().