‪TYPO3CMS  ‪main
TYPO3\CMS\Workspaces\Service\HistoryService Class Reference
Inheritance diagram for TYPO3\CMS\Workspaces\Service\HistoryService:
TYPO3\CMS\Core\SingletonInterface

Public Member Functions

 __construct ()
 
array getHistory (string $table, int $id)
 
 getStageChanges (string $table, int $id)
 

Protected Member Functions

 getHistoryEntry (array $entry)
 
 getDifferences (array $entry)
 
 getUserName (int $user)
 
 getHistoryEntries (string $table, int $id)
 
 getLanguageService ()
 

Protected Attributes

array $backendUserNames
 
array $historyEntries = []
 

Detailed Description

Definition at line 34 of file HistoryService.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Workspaces\Service\HistoryService::__construct ( )

Definition at line 39 of file HistoryService.php.

Member Function Documentation

◆ getDifferences()

TYPO3\CMS\Workspaces\Service\HistoryService::getDifferences ( array  $entry)
protected

Gets the differences between two record versions out of one record history entry.

Parameters
array$entry‪Record history entry

Definition at line 112 of file HistoryService.php.

References $fields, $GLOBALS, TYPO3\CMS\Core\Utility\CHARACTER, and TYPO3\CMS\Workspaces\Service\HistoryService\getLanguageService().

Referenced by TYPO3\CMS\Workspaces\Service\HistoryService\getHistoryEntry().

◆ getHistory()

array TYPO3\CMS\Workspaces\Service\HistoryService::getHistory ( string  $table,
int  $id 
)

Gets the editing history of a record.

Parameters
string$table‪Name of the table
int$id‪Uid of the record
Returns
‪array Record history entries

Definition at line 51 of file HistoryService.php.

References TYPO3\CMS\Core\DataHandling\History\RecordHistoryStore\ACTION_STAGECHANGE, TYPO3\CMS\Workspaces\Service\HistoryService\getHistoryEntries(), and TYPO3\CMS\Workspaces\Service\HistoryService\getHistoryEntry().

◆ getHistoryEntries()

TYPO3\CMS\Workspaces\Service\HistoryService::getHistoryEntries ( string  $table,
int  $id 
)
protected

Gets an instance of the record history of a record.

Parameters
string$table‪Name of the table
int$id‪Uid of the record

Definition at line 167 of file HistoryService.php.

Referenced by TYPO3\CMS\Workspaces\Service\HistoryService\getHistory(), and TYPO3\CMS\Workspaces\Service\HistoryService\getStageChanges().

◆ getHistoryEntry()

TYPO3\CMS\Workspaces\Service\HistoryService::getHistoryEntry ( array  $entry)
protected

Gets the human readable representation of one record history entry.

Parameters
array$entry‪Record history entry
See also
getHistory

Definition at line 87 of file HistoryService.php.

References TYPO3\CMS\Workspaces\Service\HistoryService\getDifferences(), and TYPO3\CMS\Workspaces\Service\HistoryService\getUserName().

Referenced by TYPO3\CMS\Workspaces\Service\HistoryService\getHistory().

◆ getLanguageService()

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

Definition at line 176 of file HistoryService.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Workspaces\Service\HistoryService\getDifferences().

◆ getStageChanges()

TYPO3\CMS\Workspaces\Service\HistoryService::getStageChanges ( string  $table,
int  $id 
)

◆ getUserName()

TYPO3\CMS\Workspaces\Service\HistoryService::getUserName ( int  $user)
protected

Gets the username of a backend user.

Definition at line 152 of file HistoryService.php.

Referenced by TYPO3\CMS\Workspaces\Service\HistoryService\getHistoryEntry().

Member Data Documentation

◆ $backendUserNames

array TYPO3\CMS\Workspaces\Service\HistoryService::$backendUserNames
protected

Definition at line 36 of file HistoryService.php.

◆ $historyEntries

array TYPO3\CMS\Workspaces\Service\HistoryService::$historyEntries = []
protected

Definition at line 37 of file HistoryService.php.