DatabaseIntegrityCheck

class \TYPO3\CMS\Lowlevel\Integrity\DatabaseIntegrityCheck

This class holds functions used by the TYPO3 backend to check the integrity of the database (The DBint module, 'lowlevel' extension)

Deprecated

will be removed in TYPO3 v15.0

Attributes

#[Autoconfigure]
$public: true

Table of Contents

Properties

$lostPagesList  : string
$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.
fixLostRecord()  : bool
Fixes lost record from $table with uid $uid by setting the PID to zero.
genTree()  : mixed
Generates a list of Page-uid's that corresponds to the tables in the tree.
getLostPagesList()  : string
getLRecords()  : array
getPageIdArray()  : array
getPageTranslatedPageIDArray()  : array
getRecStats()  : array
lostRecords()  : void
Fills $this->lRecords with the records from all tc-tables that are not attached to a PID in the pid-list.

Properties

$lostPagesList

protected string $lostPagesList = ''

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

Statistics

Methods

countRecords()

Counts records from $GLOBALS['TCA']-tables that ARE attached to an existing page.

public countRecords(string $pid_list) : array

Parameters

$pid_list : string

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.

fixLostRecord()

Fixes lost record from $table with uid $uid by setting the PID to zero.

public fixLostRecord(string $table, int $uid) : bool

If there is a disabled column for the record that will be set as well.

Parameters

$table : string

Database tablename

$uid : int

The uid of the record which will have the PID value set to 0 (zero)

Return values

bool —

TRUE if done.

genTree()

Generates a list of Page-uid's that corresponds to the tables in the tree.

public genTree(int $theID[, bool $versions = false ]) : mixed

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!

getLostPagesList()

public getLostPagesList() : string

Return values

string

getLRecords()

public getLRecords() : array

Return values

array

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(string $pid_list) : void

Parameters

$pid_list : string

list of pid's (page-record uid's). This list is probably made by genTree()

On this page