IntegrityService

class \TYPO3\CMS\Workspaces\Service\IntegrityService

Service for integrity

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_Succes  : 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()  : mixed
Checks integrity of affected records.
checkElement()  : mixed
Checks a single element.
getIssueMessages()  : array|string
Gets the message of all issues.
getIssues()  : array
Gets issues, all or specific for one identifier.
getStatus()  : string
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()  : mixed
Sets the affected elements.
addIssue()  : mixed
Adds an issue.
checkLocalization()  : mixed
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_Succes

Success status - everything is fine

public int STATUS_Succes = 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' => array( array( 'status' => 'warning', 'message' => 'Element cannot be...', ) )

$statusRepresentation

protected array $statusRepresentation = [self::STATUS_Succes => 'success', self::STATUS_Info => 'inf…
Show the full value[self::STATUS_Succes => 'success', self::STATUS_Info => 'info', self::STATUS_Warning => 'warning', self::STATUS_Error => 'error']

Methods

check()

Checks integrity of affected records.

public check() : mixed

getIssueMessages()

Gets the message of all issues.

public getIssueMessages([string $identifier = null ][, bool $asString = false ]) : array|string

Parameters

$identifier : string = null

Record identifier (table:id) for look-ups

$asString : bool = false

Return results as string instead of array

Return values

array|string

getIssues()

Gets issues, all or specific for one identifier.

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

Parameters

$identifier : string = null

Record identifier (table:id) for look-ups

Return values

array

getStatus()

Gets the status of the most important severity.

public getStatus([string $identifier = null ]) : string

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

Parameters

$identifier : string = null

Record identifier (table:id) for look-ups

Return values

string

getStatusRepresentation()

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

public getStatusRepresentation([string $identifier = null ]) : string

Parameters

$identifier : string = 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) : mixed

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) : mixed

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