‪TYPO3CMS  11.5
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 ($table, $id)
 
 getStageChanges (string $table, int $id)
 

Protected Member Functions

array getHistoryEntry (array $entry)
 
array getDifferences (array $entry)
 
string getUserName ($user)
 
array getHistoryEntries ($table, $id)
 
DiffUtility getDifferencesObject ()
 
LanguageService getLanguageService ()
 

Protected Attributes

array $backendUserNames
 
array $historyEntries = array( )
 
DiffUtility null $differencesObject
 

Detailed Description

Service for history

Definition at line 30 of file HistoryService.php.

Constructor & Destructor Documentation

◆ __construct()

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

Creates this object.

Definition at line 47 of file HistoryService.php.

Member Function Documentation

◆ getDifferences()

array 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
Returns
‪array

Definition at line 122 of file HistoryService.php.

References $fields, $GLOBALS, TYPO3\CMS\Workspaces\Service\HistoryService\getDifferencesObject(), TYPO3\CMS\Workspaces\Service\HistoryService\getLanguageService(), TYPO3\CMS\Core\Utility\DiffUtility\makeDiffDisplay(), and TYPO3\CMS\Core\Localization\LanguageService\sL().

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

◆ getDifferencesObject()

DiffUtility TYPO3\CMS\Workspaces\Service\HistoryService::getDifferencesObject ( )
protected

Gets an instance of the record differences utility.

Returns
‪DiffUtility

Definition at line 185 of file HistoryService.php.

References TYPO3\CMS\Workspaces\Service\HistoryService\$differencesObject.

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

◆ getHistory()

array TYPO3\CMS\Workspaces\Service\HistoryService::getHistory (   $table,
  $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 59 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()

array TYPO3\CMS\Workspaces\Service\HistoryService::getHistoryEntries (   $table,
  $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
Returns
‪array

Definition at line 171 of file HistoryService.php.

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

◆ getHistoryEntry()

array 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
Returns
‪array
See also
getHistory

Definition at line 96 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()

LanguageService TYPO3\CMS\Workspaces\Service\HistoryService::getLanguageService ( )
protected
Returns
‪LanguageService

Definition at line 197 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()

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

Gets the username of a backend user.

Parameters
string$user
Returns
‪string

Definition at line 155 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 34 of file HistoryService.php.

◆ $differencesObject

DiffUtility null TYPO3\CMS\Workspaces\Service\HistoryService::$differencesObject
protected

◆ $historyEntries

array TYPO3\CMS\Workspaces\Service\HistoryService::$historyEntries = array( )
protected

Definition at line 38 of file HistoryService.php.