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

Public Member Functions

 __construct (ConnectionPool $connectionPool)
 
 configure ()
 

Protected Member Functions

int 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)
 

Private Attributes

ConnectionPool $connectionPool
 

Detailed Description

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

Definition at line 37 of file CleanFlexFormsCommand.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Lowlevel\Command\CleanFlexFormsCommand::__construct ( ConnectionPool  $connectionPool)

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 264 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 228 of file CleanFlexFormsCommand.php.

References $GLOBALS, and TYPO3\CMS\Core\Database\Connection\PARAM_INT.

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 52 of file CleanFlexFormsCommand.php.

◆ execute()

int 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 136 of file CleanFlexFormsCommand.php.

References $GLOBALS, TYPO3\CMS\Lowlevel\Command\CleanFlexFormsCommand\compareAllFlexFormsInRecord(), and TYPO3\CMS\Core\Database\Connection\PARAM_INT.

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

Member Data Documentation

◆ $connectionPool

ConnectionPool TYPO3\CMS\Lowlevel\Command\CleanFlexFormsCommand::$connectionPool
private