IntegrityService

readonly class \TYPO3\CMS\Workspaces\Service\IntegrityService

Table of Contents

Constants

STATUS_Error  : mixed = 103
STATUS_Info  : mixed = 101
STATUS_Representation  : mixed = [self::STATUS_Success => 'success', self::STATU...
STATUS_Success  : mixed = 100
STATUS_Warning  : mixed = 102

Methods

__construct()  : mixed
check()  : array
Sets the affected elements.
checkElement()  : array
Get integrity of a single element.
getIssueMessages()  : array
Gets the message of all issues.
getIssues()  : array
Gets issues, all or specific for one identifier.
getStatus()  : int
Gets the status of the most important severity.
getStatusRepresentation()  : string
Gets the (human-readable) representation of the status with the most important severity (wraps $this->getStatus() and translates the result).
addIssue()  : array
Adds an issue to array of existing issues.
getLanguageService()  : LanguageService

Constants

STATUS_Error

protected mixed STATUS_Error = 103

STATUS_Info

protected mixed STATUS_Info = 101

STATUS_Representation

protected mixed STATUS_Representation = [self::STATUS_Success => 'success', self::STATUS_Info => 'in…
Show the full value[self::STATUS_Success => 'success', self::STATUS_Info => 'info', self::STATUS_Warning => 'warning', self::STATUS_Error => 'error']

STATUS_Success

protected mixed STATUS_Success = 100

STATUS_Warning

protected mixed STATUS_Warning = 102

Methods

checkElement()

Get integrity of a single element.

public checkElement(CombinedRecord $element, array $existingIssues) : array

Check workspace localization integrity of a single element. If current record is a localization and its localization parent is new in this workspace, then both (localization and localization parent) should be published.

The method returns an array of below shape, array keys are identifiers of table and version-id.

'tx_table:123' => [ [ 'status' => 102, 'message' => 'Element cannot be...', ], ],

Parameters

$element : CombinedRecord
$existingIssues : array

Return values

array

getIssueMessages()

Gets the message of all issues.

public getIssueMessages(array $issues[, string|null $identifier = null ]) : array

Parameters

$issues : array
$identifier : string|null = null

Record identifier (table:id) for look-ups

Return values

array

getIssues()

Gets issues, all or specific for one identifier.

public getIssues(array $issues[, string|null $identifier = null ]) : array

Parameters

$issues : array
$identifier : string|null = null

Record identifier (table:id) for look-ups

Return values

array

getStatus()

Gets the status of the most important severity.

public getStatus(array $issues[, string|null $identifier = null ]) : int

(low << success, info, warning, error >> high)

Parameters

$issues : array
$identifier : string|null = null

Record identifier (table:id) for look-ups

Return values

int

getStatusRepresentation()

Gets the (human-readable) representation of the status with the most important severity (wraps $this->getStatus() and translates the result).

public getStatusRepresentation(array $issues[, string|null $identifier = null ]) : string

Parameters

$issues : array
$identifier : string|null = null

Record identifier (table:id) for look-ups

Return values

string —

One out of success, info, warning, error

addIssue()

Adds an issue to array of existing issues.

protected addIssue(array $existingIssues, string $identifier, int $status, string $message) : array

Parameters

$existingIssues : array
$identifier : string

Record identifier (table:id)

$status : int

Status code (see constants)

$message : string

Message/description of the issue

Return values

array
On this page