TYPO3 CMS  TYPO3_7-6
TYPO3\CMS\Install\Updates\TableFlexFormToTtContentFieldsUpdate Class Reference
Inheritance diagram for TYPO3\CMS\Install\Updates\TableFlexFormToTtContentFieldsUpdate:
TYPO3\CMS\Install\Updates\AbstractUpdate

Public Member Functions

 checkForUpdate (&$description)
 
 performUpdate (array &$databaseQueries, &$customMessages)
 
- Public Member Functions inherited from TYPO3\CMS\Install\Updates\AbstractUpdate
 getTitle ()
 
 setTitle ($title)
 
 getIdentifier ()
 
 setIdentifier ($identifier)
 
 shouldRenderWizard ()
 
 shouldRenderNextButton ()
 
 checkIfTableExists ($table)
 
 checkForUpdate (&$description)
 
 performUpdate (array &$dbQueries, &$customMessages)
 

Protected Member Functions

 mapFieldsFromFlexForm ($flexForm)
 
 initializeFlexForm ($flexFormXml)
 
 getFlexFormValue (array $flexForm, $fieldName, $sheet='sDEF')
 
- Protected Member Functions inherited from TYPO3\CMS\Install\Updates\AbstractUpdate
 markWizardAsDone ($confValue=1)
 
 isWizardDone ()
 
 getDatabaseConnection ()
 

Protected Attributes

 $title = 'Migrate the Flexform for CType "table" to regular fields in tt_content'
 
- Protected Attributes inherited from TYPO3\CMS\Install\Updates\AbstractUpdate
 $title
 
 $identifier
 

Additional Inherited Members

- Public Attributes inherited from TYPO3\CMS\Install\Updates\AbstractUpdate
 $pObj
 
 $userInput
 
 $versionNumber
 

Detailed Description

Migrate the Flexform for CType 'table' to regular fields in tt_content

Definition at line 23 of file TableFlexFormToTtContentFieldsUpdate.php.

Member Function Documentation

◆ checkForUpdate()

TYPO3\CMS\Install\Updates\TableFlexFormToTtContentFieldsUpdate::checkForUpdate ( $description)

Checks if an update is needed

Parameters
string&$descriptionThe description for the update
Returns
bool Whether an update is needed (TRUE) or not (FALSE)

Definition at line 36 of file TableFlexFormToTtContentFieldsUpdate.php.

References TYPO3\CMS\Install\Updates\AbstractUpdate\getDatabaseConnection(), TYPO3\CMS\Core\Utility\ExtensionManagementUtility\isLoaded(), and TYPO3\CMS\Install\Updates\AbstractUpdate\isWizardDone().

◆ getFlexFormValue()

TYPO3\CMS\Install\Updates\TableFlexFormToTtContentFieldsUpdate::getFlexFormValue ( array  $flexForm,
  $fieldName,
  $sheet = 'sDEF' 
)
protected
Parameters
array$flexFormThe content of the FlexForm
string$fieldNameThe field name to get the value for
string$sheetThe sheet on which this value is located
Returns
string The value

Definition at line 191 of file TableFlexFormToTtContentFieldsUpdate.php.

Referenced by TYPO3\CMS\Install\Updates\TableFlexFormToTtContentFieldsUpdate\mapFieldsFromFlexForm().

◆ initializeFlexForm()

TYPO3\CMS\Install\Updates\TableFlexFormToTtContentFieldsUpdate::initializeFlexForm (   $flexFormXml)
protected

Convert the XML of the FlexForm to an array

Parameters
string | NULL$flexFormXmlThe XML of the FlexForm
Returns
array|NULL Converted XML to array

Definition at line 171 of file TableFlexFormToTtContentFieldsUpdate.php.

References TYPO3\CMS\Core\Utility\GeneralUtility\xml2array().

Referenced by TYPO3\CMS\Install\Updates\TableFlexFormToTtContentFieldsUpdate\performUpdate().

◆ mapFieldsFromFlexForm()

TYPO3\CMS\Install\Updates\TableFlexFormToTtContentFieldsUpdate::mapFieldsFromFlexForm (   $flexForm)
protected

Map the old FlexForm values to the new database fields and fill them with the proper data

Parameters
array$flexFormThe content of the FlexForm
Returns
array The fields which need to be updated in the tt_content table

Definition at line 108 of file TableFlexFormToTtContentFieldsUpdate.php.

References TYPO3\CMS\Install\Updates\TableFlexFormToTtContentFieldsUpdate\getFlexFormValue().

Referenced by TYPO3\CMS\Install\Updates\TableFlexFormToTtContentFieldsUpdate\performUpdate().

◆ performUpdate()

TYPO3\CMS\Install\Updates\TableFlexFormToTtContentFieldsUpdate::performUpdate ( array &  $databaseQueries,
$customMessages 
)

Performs the database update if CType 'table' still has content in pi_flexform

Parameters
array&$databaseQueriesQueries done in this update
mixed&$customMessagesCustom messages
Returns
bool

Definition at line 65 of file TableFlexFormToTtContentFieldsUpdate.php.

References TYPO3\CMS\Install\Updates\AbstractUpdate\getDatabaseConnection(), TYPO3\CMS\Install\Updates\TableFlexFormToTtContentFieldsUpdate\initializeFlexForm(), TYPO3\CMS\Install\Updates\TableFlexFormToTtContentFieldsUpdate\mapFieldsFromFlexForm(), and TYPO3\CMS\Install\Updates\AbstractUpdate\markWizardAsDone().

Member Data Documentation

◆ $title

TYPO3\CMS\Install\Updates\TableFlexFormToTtContentFieldsUpdate::$title = 'Migrate the Flexform for CType "table" to regular fields in tt_content'
protected

Definition at line 28 of file TableFlexFormToTtContentFieldsUpdate.php.