DatabaseIntegrityCheck
This class holds functions used by the TYPO3 backend for the RecordStatistics Service of the database.
not part of TYPO3 Core API
Attributes
- #[Autoconfigure]
- $public: true
Table of Contents
Properties
- $connectionPool : ConnectionPool
- $lRecords : array
- $pageIdArray : array
- $pageTranslatedPageIDArray : array
- $recStats : array
- $tcaSchemaFactory : TcaSchemaFactory
Methods
- __construct() : mixed
- countRecords() : array
- Counts records from $GLOBALS['TCA']-tables that ARE attached to an existing page.
- genTree() : void
- Generates a list of Page-uid's that corresponds to the tables in the tree.
- getPageIdArray() : array
- getPageTranslatedPageIDArray() : array
- getRecStats() : array
- lostRecords() : array
- Fills $this->lRecords with the records from all tc-tables that are not attached to a PID in the pid-list.
Properties
$connectionPool read-only
protected
ConnectionPool
$connectionPool
$lRecords
protected
array
$lRecords
= []
$pageIdArray
protected
array
$pageIdArray
= []
Will hold id/rec pairs from genTree()
$pageTranslatedPageIDArray
protected
array
$pageTranslatedPageIDArray
= []
Will hold id/rec pairs from genTree() that are not default language
$recStats
protected
array
$recStats
= ['all_valid' => [], 'published_versions' => [], 'deleted' => []]
$tcaSchemaFactory read-only
protected
TcaSchemaFactory
$tcaSchemaFactory
Methods
__construct()
public
__construct(TcaSchemaFactory $tcaSchemaFactory, ConnectionPool $connectionPool) : mixed
Parameters
- $tcaSchemaFactory : TcaSchemaFactory
- $connectionPool : ConnectionPool
countRecords()
Counts records from $GLOBALS['TCA']-tables that ARE attached to an existing page.
public
countRecords(array $pageIds) : array
Parameters
- $pageIds : array
-
list of pid's (page-record uid's). This list is probably made by genTree()
Return values
array —an array with the number of records from all $GLOBALS['TCA']-tables that are attached to a PID in the pid-list.
genTree()
Generates a list of Page-uid's that corresponds to the tables in the tree.
public
genTree(int $theID[, bool $versions = false ]) : void
This list should ideally include all records in the pages-table.
Parameters
- $theID : int
-
a pid (page-record id) from which to start making the tree
- $versions : bool = false
-
Internal variable, don't set from outside!
getPageIdArray()
public
getPageIdArray() : array
Return values
arraygetPageTranslatedPageIDArray()
public
getPageTranslatedPageIDArray() : array
Return values
arraygetRecStats()
public
getRecStats() : array
Return values
arraylostRecords()
Fills $this->lRecords with the records from all tc-tables that are not attached to a PID in the pid-list.
public
lostRecords(array $pageIds) : array
Parameters
- $pageIds : array
-
list of pid's (page-record uid's). This list is probably made by genTree()