IntegrityService

readonly class \TYPO3\CMS\Redirects\Service\IntegrityService

Checks for redirects that conflict with existing pages

Table of Contents

Methods

__construct()  : mixed
checkRedirectIntegrity()  : Generator
Checks all redirects by dispatching a PSR-14 event for each record, allowing listeners to validate targets and flag broken redirects.
findConflictingRedirects()  : Generator
Resolves all conflicting redirects
findShadowedRedirects()  : Generator
Resolves all redirects which can never match, because another redirect with the same source is matched first whenever the redirect itself would be active.
resetIntegrityStatus()  : void
Resets the integrity status of all redirects which are not listed in $conflictingUids, except those with a status listed in $statusesToKeep.
setIntegrityStatus()  : void
updateShadowedIntegrityStatus()  : array<int, array>
Updates the shadowed integrity status of all redirects of the given source hosts.

Methods

checkRedirectIntegrity()

Checks all redirects by dispatching a PSR-14 event for each record, allowing listeners to validate targets and flag broken redirects.

public checkRedirectIntegrity() : Generator

Return values

Generator

findConflictingRedirects()

Resolves all conflicting redirects

public findConflictingRedirects([string|null $siteIdentifier = null ]) : Generator

Parameters

$siteIdentifier : string|null = null

Return values

Generator

findShadowedRedirects()

Resolves all redirects which can never match, because another redirect with the same source is matched first whenever the redirect itself would be active.

public findShadowedRedirects([string[] $sourceHosts = [] ]) : Generator

Parameters

$sourceHosts : string[] = []

Limits the check to these source hosts, all are checked if empty

Return values

Generator

resetIntegrityStatus()

Resets the integrity status of all redirects which are not listed in $conflictingUids, except those with a status listed in $statusesToKeep.

public resetIntegrityStatus(int[] $conflictingUids[, string[] $statusesToKeep = [] ]) : void

Parameters

$conflictingUids : int[]
$statusesToKeep : string[] = []

setIntegrityStatus()

public setIntegrityStatus(array $redirect) : void

Parameters

$redirect : array

updateShadowedIntegrityStatus()

Updates the shadowed integrity status of all redirects of the given source hosts.

public updateShadowedIntegrityStatus(string[] $sourceHosts) : array<int, array>

Parameters

$sourceHosts : string[]

Return values

array<int, array> —

The shadowed redirects

On this page