DatabaseIntegrityCheck

class \TYPO3\CMS\Reports\Integrity\DatabaseIntegrityCheck

This class holds functions used by the TYPO3 backend for the RecordStatistics Service of the database.

Attributes

#[Autoconfigure]
$public: true

Table of Contents

Properties

$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

$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' => []]

Methods

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

array

getPageTranslatedPageIDArray()

public getPageTranslatedPageIDArray() : array

Return values

array

getRecStats()

public getRecStats() : array

Return values

array

lostRecords()

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

Return values

array
On this page