‪TYPO3CMS  11.5
TYPO3\CMS\Workspaces\Service\IntegrityService Class Reference

Public Member Functions

 setAffectedElements (array $affectedElements)
 
 check ()
 
 checkElement (CombinedRecord $element)
 
string getStatus ($identifier=null)
 
string getStatusRepresentation ($identifier=null)
 
array getIssues ($identifier=null)
 
array string getIssueMessages ($identifier=null, $asString=false)
 

Public Attributes

const STATUS_Succes = 100
 
const STATUS_Info = 101
 
const STATUS_Warning = 102
 
const STATUS_Error = 103
 

Protected Member Functions

 checkLocalization (CombinedRecord $element)
 
 addIssue ($identifier, $status, $message)
 
 getLanguageService ()
 

Protected Attributes

array $statusRepresentation
 
CombinedRecord[] $affectedElements
 
array $issues = array( )
 

Detailed Description

Service for integrity

Definition at line 26 of file IntegrityService.php.

Member Function Documentation

◆ addIssue()

TYPO3\CMS\Workspaces\Service\IntegrityService::addIssue (   $identifier,
  $status,
  $message 
)
protected

Adds an issue.

Parameters
string$identifier‪Record identifier (table:id)
int$status‪Status code (see constants)
string$message‪Message/description of the issue

Definition at line 241 of file IntegrityService.php.

Referenced by TYPO3\CMS\Workspaces\Service\IntegrityService\checkLocalization().

◆ check()

TYPO3\CMS\Workspaces\Service\IntegrityService::check ( )

Checks integrity of affected records.

Definition at line 93 of file IntegrityService.php.

References TYPO3\CMS\Workspaces\Service\IntegrityService\checkElement().

◆ checkElement()

TYPO3\CMS\Workspaces\Service\IntegrityService::checkElement ( CombinedRecord  $element)

◆ checkLocalization()

TYPO3\CMS\Workspaces\Service\IntegrityService::checkLocalization ( CombinedRecord  $element)
protected

◆ getIssueMessages()

array string TYPO3\CMS\Workspaces\Service\IntegrityService::getIssueMessages (   $identifier = null,
  $asString = false 
)

Gets the message of all issues.

Parameters
string$identifier‪Record identifier (table:id) for look-ups
bool$asString‪Return results as string instead of array
Returns
‪array|string

Definition at line 214 of file IntegrityService.php.

References TYPO3\CMS\Workspaces\Service\IntegrityService\getIssues().

◆ getIssues()

array TYPO3\CMS\Workspaces\Service\IntegrityService::getIssues (   $identifier = null)

Gets issues, all or specific for one identifier.

Parameters
string$identifier‪Record identifier (table:id) for look-ups
Returns
‪array

Definition at line 196 of file IntegrityService.php.

References TYPO3\CMS\Workspaces\Service\IntegrityService\$issues.

Referenced by TYPO3\CMS\Workspaces\Service\IntegrityService\getIssueMessages(), and TYPO3\CMS\Workspaces\Service\IntegrityService\getStatus().

◆ getLanguageService()

TYPO3\CMS\Workspaces\Service\IntegrityService::getLanguageService ( )
protected

◆ getStatus()

string TYPO3\CMS\Workspaces\Service\IntegrityService::getStatus (   $identifier = null)

Gets the status of the most important severity. (low << success, info, warning, error >> high)

Parameters
string$identifier‪Record identifier (table:id) for look-ups
Returns
‪string

Definition at line 157 of file IntegrityService.php.

References TYPO3\CMS\Workspaces\Service\IntegrityService\getIssues(), and TYPO3\CMS\Workspaces\Service\IntegrityService\STATUS_Succes.

Referenced by TYPO3\CMS\Workspaces\Service\IntegrityService\getStatusRepresentation().

◆ getStatusRepresentation()

string TYPO3\CMS\Workspaces\Service\IntegrityService::getStatusRepresentation (   $identifier = null)

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

Parameters
string$identifier‪Record identifier (table:id) for look-ups
Returns
‪string One out of success, info, warning, error

Definition at line 185 of file IntegrityService.php.

References TYPO3\CMS\Workspaces\Service\IntegrityService\getStatus().

Referenced by TYPO3\CMS\Workspaces\Service\GridDataService\generateDataArray().

◆ setAffectedElements()

TYPO3\CMS\Workspaces\Service\IntegrityService::setAffectedElements ( array  $affectedElements)

Sets the affected elements.

Parameters
CombinedRecord[]$affectedElements

Definition at line 85 of file IntegrityService.php.

References TYPO3\CMS\Workspaces\Service\IntegrityService\$affectedElements.

Member Data Documentation

◆ $affectedElements

CombinedRecord [] TYPO3\CMS\Workspaces\Service\IntegrityService::$affectedElements
protected

◆ $issues

array TYPO3\CMS\Workspaces\Service\IntegrityService::$issues = array( )
protected

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.

'tx_table:123' => array( array( 'status' => 'warning', 'message' => 'Element cannot be...', ) )

Definition at line 78 of file IntegrityService.php.

Referenced by TYPO3\CMS\Workspaces\Service\IntegrityService\getIssues().

◆ $statusRepresentation

array TYPO3\CMS\Workspaces\Service\IntegrityService::$statusRepresentation
protected
Initial value:
= array(
self::STATUS_Succes => 'success',
self::STATUS_Info => 'info',
self::STATUS_Warning => 'warning',
self::STATUS_Error => 'error',
)

Definition at line 54 of file IntegrityService.php.

◆ STATUS_Error

const TYPO3\CMS\Workspaces\Service\IntegrityService::STATUS_Error = 103

Definition at line 51 of file IntegrityService.php.

◆ STATUS_Info

const TYPO3\CMS\Workspaces\Service\IntegrityService::STATUS_Info = 101

Definition at line 39 of file IntegrityService.php.

◆ STATUS_Succes

const TYPO3\CMS\Workspaces\Service\IntegrityService::STATUS_Succes = 100

◆ STATUS_Warning

const TYPO3\CMS\Workspaces\Service\IntegrityService::STATUS_Warning = 102

Definition at line 45 of file IntegrityService.php.