TYPO3  7.6
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
HistoryService Class Reference
Inheritance diagram for HistoryService:
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 = array()
 
 $differencesObject
 

Detailed Description

Service for history

Definition at line 22 of file HistoryService.php.

Constructor & Destructor Documentation

__construct ( )

Creates this object.

Definition at line 42 of file HistoryService.php.

References BackendUtility\getUserNames().

Member Function Documentation

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, HistoryService\getDifferencesObject(), BackendUtility\getItemLabel(), and HistoryService\getLanguageService().

Referenced by HistoryService\getHistoryEntry().

getDifferencesObject ( )
protected

Gets an instance of the record differences utility.

Returns

Definition at line 160 of file HistoryService.php.

References HistoryService\$differencesObject.

Referenced by HistoryService\getDifferences().

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 HistoryService\getHistoryEntry().

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 BackendUtility\datetime(), HistoryService\getDifferences(), and HistoryService\getUserName().

Referenced by HistoryService\getHistory().

getLanguageService ( )
protected
Returns

Definition at line 171 of file HistoryService.php.

References $GLOBALS.

Referenced by HistoryService\getDifferences().

getUserName (   $user)
protected

Gets the username of a backend user.

Parameters
string$user
Returns
string

Definition at line 127 of file HistoryService.php.

Referenced by HistoryService\getHistoryEntry().

Member Data Documentation

$backendUserNames
protected

Definition at line 27 of file HistoryService.php.

$differencesObject
protected

Definition at line 37 of file HistoryService.php.

Referenced by HistoryService\getDifferencesObject().

$historyObjects = array()
protected

Definition at line 32 of file HistoryService.php.