IntegrityService

Internal

Table of Contents

Constants

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

Properties

$affectedElements  : array<string|int, CombinedRecord>
$issues  : array<string|int, mixed>
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<string|int, mixed>

Methods

check()  : void
Checks integrity of affected records.
checkElement()  : void
Checks a single element.
getIssueMessages()  : array<string|int, mixed>
Gets the message of all issues.
getIssues()  : array<string|int, mixed>
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<string|int, mixed> $issues = []

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

$statusRepresentation

protected array<string|int, mixed> $statusRepresentation = [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<string|int, mixed>
Parameters
$identifier : string|null = null

Record identifier (table:id) for look-ups

Return values
array<string|int, mixed>

getIssues()

Gets issues, all or specific for one identifier.

public getIssues([string|null $identifier = null ]) : array<string|int, mixed>
Parameters
$identifier : string|null = null

Record identifier (table:id) for look-ups

Return values
array<string|int, mixed>

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

setAffectedElements()

Sets the affected elements.

public setAffectedElements(array<string|int, CombinedRecord$affectedElements) : void
Parameters
$affectedElements : array<string|int, CombinedRecord>

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

Search results