‪TYPO3CMS  9.5
TYPO3\CMS\Lowlevel\Command\CleanFlexFormsCommand Class Reference
Inheritance diagram for TYPO3\CMS\Lowlevel\Command\CleanFlexFormsCommand:

Public Member Functions

 configure ()
 

Protected Member Functions

 execute (InputInterface $input, OutputInterface $output)
 
array findAllDirtyFlexformsInPage (int $pageId, int $depth, array $dirtyFlexFormFields=[])
 
array compareAllFlexFormsInRecord (string $tableName, int $uid, array $dirtyFlexFormFields=[])
 
 cleanFlexFormRecords (array $records, bool $dryRun, SymfonyStyle $io)
 

Detailed Description

Checks if TCA records with a FlexForm includes values that don't match the connected FlexForm value

Definition at line 34 of file CleanFlexFormsCommand.php.

Member Function Documentation

◆ cleanFlexFormRecords()

TYPO3\CMS\Lowlevel\Command\CleanFlexFormsCommand::cleanFlexFormRecords ( array  $records,
bool  $dryRun,
SymfonyStyle  $io 
)
protected

Actually cleans the database record fields with a new FlexForm as chosen currently for this record

Parameters
array$records
bool$dryRun
SymfonyStyle$io

Definition at line 251 of file CleanFlexFormsCommand.php.

Referenced by TYPO3\CMS\Lowlevel\Command\CleanFlexFormsCommand\execute().

◆ compareAllFlexFormsInRecord()

array TYPO3\CMS\Lowlevel\Command\CleanFlexFormsCommand::compareAllFlexFormsInRecord ( string  $tableName,
int  $uid,
array  $dirtyFlexFormFields = [] 
)
protected

Check a specific record on all TCA columns if they are FlexForms and if the FlexForm values don't match to the newly defined ones.

Parameters
string$tableName‪Table name
int$uid‪UID of record in processing
array$dirtyFlexFormFields‪the existing FlexForm fields
Returns
‪array the updated list of dirty FlexForm fields

Definition at line 215 of file CleanFlexFormsCommand.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Lowlevel\Command\CleanFlexFormsCommand\findAllDirtyFlexformsInPage().

◆ configure()

TYPO3\CMS\Lowlevel\Command\CleanFlexFormsCommand::configure ( )

Configure the command by defining the name, options and arguments

Definition at line 40 of file CleanFlexFormsCommand.php.

◆ execute()

TYPO3\CMS\Lowlevel\Command\CleanFlexFormsCommand::execute ( InputInterface  $input,
OutputInterface  $output 
)
protected

◆ findAllDirtyFlexformsInPage()

array TYPO3\CMS\Lowlevel\Command\CleanFlexFormsCommand::findAllDirtyFlexformsInPage ( int  $pageId,
int  $depth,
array  $dirtyFlexFormFields = [] 
)
protected

Recursive traversal of page tree

Parameters
int$pageId‪Page root id
int$depth‪Depth
array$dirtyFlexFormFields‪the list of all previously found flexform fields
Returns
‪array

Definition at line 123 of file CleanFlexFormsCommand.php.

References $GLOBALS, TYPO3\CMS\Lowlevel\Command\CleanFlexFormsCommand\compareAllFlexFormsInRecord(), and TYPO3\CMS\Backend\Utility\BackendUtility\selectVersionsOfRecord().

Referenced by TYPO3\CMS\Lowlevel\Command\CleanFlexFormsCommand\execute().