IntegrityService

class \TYPO3\CMS\Workspaces\Service\IntegrityService

Table of Contents

Constants

STATUS_Error  : int = 103
Error status - user interaction is required
STATUS_Info  : int = 101
Info status - nothing is wrong, but a notice is shown
STATUS_Success  : int = 100
Success status - everything is fine
STATUS_Warning  : int = 102
Warning status - user interaction might be required

Properties

$affectedElements  : CombinedRecord[]
$issues  : array
Array storing all issues that have been checked and found during runtime in this object. The array keys are identifiers of table and the version-id.
$statusRepresentation  : array

Methods

check()  : void
Checks integrity of affected records.
checkElement()  : void
Checks 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).
setAffectedElements()  : void
Sets the affected elements.
addIssue()  : void
Adds an issue.
checkLocalization()  : void
Check workspace localization integrity of a single elements.
getLanguageService()  : LanguageService

Constants

STATUS_Error

Error status - user interaction is required

public int STATUS_Error = 103

STATUS_Info

Info status - nothing is wrong, but a notice is shown

public int STATUS_Info = 101

STATUS_Success

Success status - everything is fine

public int STATUS_Success = 100

STATUS_Warning

Warning status - user interaction might be required

public int STATUS_Warning = 102

Properties

$issues

Array storing all issues that have been checked and found during runtime in this object. The array keys are identifiers of table and the version-id.

protected array $issues = []

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

$statusRepresentation

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

Methods

check()

Checks integrity of affected records.

public check() : void

getIssueMessages()

Gets the message of all issues.

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

Parameters

$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([string|null $identifier = null ]) : array

Parameters

$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([string|null $identifier = null ]) : int

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

Parameters

$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([string|null $identifier = null ]) : string

Parameters

$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.

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

Parameters

$identifier : string

Record identifier (table:id)

$status : int

Status code (see constants)

$message : string

Message/description of the issue

checkLocalization()

Check workspace localization integrity of a single elements.

protected checkLocalization(CombinedRecord $element) : void

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

Parameters

$element : CombinedRecord
On this page