TYPO3 CMS  TYPO3_7-6
TYPO3\CMS\Workspaces\Service\HistoryService Class Reference
Inheritance diagram for TYPO3\CMS\Workspaces\Service\HistoryService:
TYPO3\CMS\Core\SingletonInterface

Public Member Functions

 __construct ()
 
 getHistory ($table, $id)
 

Protected Member Functions

 getHistoryEntry (array $entry)
 
 getDifferences (array $entry)
 
 getUserName ($user)
 
 getDifferencesObject ()
 
 getLanguageService ()
 

Protected Attributes

 $backendUserNames
 
 $historyObjects = []
 
 $differencesObject
 

Detailed Description

Service for history

Definition at line 22 of file HistoryService.php.

Constructor & Destructor Documentation

◆ __construct()

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

Creates this object.

Definition at line 42 of file HistoryService.php.

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

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$entryRecord history entry
Returns
array

Definition at line 96 of file HistoryService.php.

References $GLOBALS, TYPO3\CMS\Workspaces\Service\HistoryService\getDifferencesObject(), TYPO3\CMS\Backend\Utility\BackendUtility\getItemLabel(), and TYPO3\CMS\Workspaces\Service\HistoryService\getLanguageService().

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

◆ getDifferencesObject()

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

◆ getHistory()

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

Gets the editing history of a record.

Parameters
string$tableName of the table
int$idUid of the record
Returns
array Record history entries

Definition at line 54 of file HistoryService.php.

References TYPO3\CMS\Workspaces\Service\HistoryService\getHistoryEntry().

◆ getHistoryEntry()

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

Gets the human readable representation of one record history entry.

Parameters
array$entryRecord history entry
Returns
array
See also
getHistory

Definition at line 75 of file HistoryService.php.

References TYPO3\CMS\Backend\Utility\BackendUtility\datetime(), 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
Returns

Definition at line 172 of file HistoryService.php.

References $GLOBALS.

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

◆ getUserName()

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

Gets the username of a backend user.

Parameters
string$user
Returns
string

Definition at line 127 of file HistoryService.php.

References TYPO3\CMS\Core\Utility\GeneralUtility\makeInstance().

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

Member Data Documentation

◆ $backendUserNames

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

Definition at line 27 of file HistoryService.php.

◆ $differencesObject

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

◆ $historyObjects

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

Definition at line 32 of file HistoryService.php.