TYPO3 CMS  TYPO3_6-2
TYPO3\CMS\Workspaces\Service\HistoryService Class Reference
Inheritance diagram for TYPO3\CMS\Workspaces\Service\HistoryService:
TYPO3\CMS\Core\SingletonInterface Tx_Workspaces_Service_History

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

Author
Oliver Hader olive.nosp@m.r.ha.nosp@m.der@t.nosp@m.ypo3.nosp@m..org

Definition at line 24 of file HistoryService.php.

Constructor & Destructor Documentation

◆ __construct()

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

Creates this object.

Definition at line 44 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 95 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
integer$idUid of the record
Returns
array Record history entries

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

◆ $differencesObject

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

◆ $historyObjects

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

Definition at line 34 of file HistoryService.php.