‪TYPO3CMS  10.4
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)
 

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 $differencesObject
 

Detailed Description

Service for history

Definition at line 29 of file HistoryService.php.

Constructor & Destructor Documentation

◆ __construct()

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

Creates this object.

Definition at line 46 of file HistoryService.php.

References TYPO3\CMS\Backend\Utility\BackendUtility\getUserNames().

Member Function Documentation

◆ getDifferences()

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

◆ getDifferencesObject()

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

Gets an instance of the record differences utility.

Returns
‪DiffUtility

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

References 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 152 of file HistoryService.php.

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

◆ 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 79 of file HistoryService.php.

References TYPO3\CMS\Backend\Utility\BackendUtility\datetime(), TYPO3\CMS\Workspaces\Service\HistoryService\getDifferences(), TYPO3\CMS\Backend\Utility\BackendUtility\getRecord(), 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 178 of file HistoryService.php.

References $GLOBALS.

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

◆ 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 136 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 33 of file HistoryService.php.

◆ $differencesObject

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

◆ $historyEntries

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

Definition at line 37 of file HistoryService.php.