CleanFlexFormsCommand
class \
- Extends
- Command
Checks if TCA records with a FlexForm includes values that don't match the connected FlexForm value
Table of Contents
Methods
- __construct() : mixed
- configure() : mixed
- Configure the command by defining the name, options and arguments
- cleanFlexFormRecords() : mixed
- Actually cleans the database record fields with a new FlexForm as chosen currently for this record
- compareAllFlexFormsInRecord() : array
- 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.
- execute() : int
- Executes the command to find and update records with FlexForms where the values do not match the datastructures
- findAllDirtyFlexformsInPage() : array
- Recursive traversal of page tree
Methods
__construct()
public
__construct(ConnectionPool $connectionPool) : mixed
Parameters
- $connectionPool : ConnectionPool
configure()
Configure the command by defining the name, options and arguments
public
configure() : mixed
cleanFlexFormRecords()
Actually cleans the database record fields with a new FlexForm as chosen currently for this record
protected
cleanFlexFormRecords(array $records, bool $dryRun, SymfonyStyle $io) : mixed
Parameters
- $records : array
- $dryRun : bool
- $io : SymfonyStyle
compareAllFlexFormsInRecord()
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.
protected
compareAllFlexFormsInRecord(string $tableName, int $uid[, array $dirtyFlexFormFields = [] ]) : array
Parameters
- $tableName : string
-
Table name
- $uid : int
-
UID of record in processing
- $dirtyFlexFormFields : array = []
-
the existing FlexForm fields
Return values
array —the updated list of dirty FlexForm fields
execute()
Executes the command to find and update records with FlexForms where the values do not match the datastructures
protected
execute(InputInterface $input, OutputInterface $output) : int
Parameters
- $input : InputInterface
- $output : OutputInterface
Return values
intfindAllDirtyFlexformsInPage()
Recursive traversal of page tree
protected
findAllDirtyFlexformsInPage(int $pageId, int $depth[, array $dirtyFlexFormFields = [] ]) : array
Parameters
- $pageId : int
- $depth : int
- $dirtyFlexFormFields : array = []