‪TYPO3CMS  ‪main
TYPO3\CMS\Backend\Controller\ContentElement\ElementHistoryController Class Reference

Public Member Functions

 __construct (protected readonly IconFactory $iconFactory, protected readonly UriBuilder $uriBuilder, protected readonly ModuleTemplateFactory $moduleTemplateFactory, private readonly DiffUtility $diffUtility,)
 
ResponseInterface mainAction (ServerRequestInterface $request)
 

Protected Member Functions

 setPagePath ($table, $uid)
 
 getButtons ()
 
 processSettings (ServerRequestInterface $request)
 
 displayMultipleDiff (array $diff)
 
 displayHistory (array $historyEntries)
 
array renderDiff ($entry, $table, $rollbackUid=0, bool $showRollbackLink=false)
 
 buildUrl ($overrideParameters=[])
 
 generateTitle ($table, $uid)
 
array null getRecord ($table, $uid)
 
 getLanguageService ()
 
 getBackendUser ()
 
 getEditLockFromElement ($tableName, $elementUid)
 

Protected Attributes

RecordHistory $historyObject
 
bool $showDiff = true
 
array $recordCache = array( )
 
ModuleTemplate $view
 
string $returnUrl = ''
 

Detailed Description

Controller for showing the history module of TYPO3s backend.

This class is a specific Backend controller implementation and is not considered part of the Public TYPO3 API.

Definition at line 47 of file ElementHistoryController.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Backend\Controller\ContentElement\ElementHistoryController::__construct ( protected readonly IconFactory  $iconFactory,
protected readonly UriBuilder  $uriBuilder,
protected readonly ModuleTemplateFactory  $moduleTemplateFactory,
private readonly DiffUtility  $diffUtility 
)

Definition at line 67 of file ElementHistoryController.php.

Member Function Documentation

◆ buildUrl()

◆ displayHistory()

◆ displayMultipleDiff()

◆ generateTitle()

◆ getBackendUser()

◆ getButtons()

TYPO3\CMS\Backend\Controller\ContentElement\ElementHistoryController::getButtons ( )
protected

◆ getEditLockFromElement()

TYPO3\CMS\Backend\Controller\ContentElement\ElementHistoryController::getEditLockFromElement (   $tableName,
  $elementUid 
)
protected

Get the editlock value from page of a history element

Parameters
string$tableName
int$elementUid

Definition at line 479 of file ElementHistoryController.php.

References $GLOBALS, TYPO3\CMS\Webhooks\Message\$record, and TYPO3\CMS\Backend\Controller\ContentElement\ElementHistoryController\getBackendUser().

Referenced by TYPO3\CMS\Backend\Controller\ContentElement\ElementHistoryController\mainAction().

◆ getLanguageService()

◆ getRecord()

array null TYPO3\CMS\Backend\Controller\ContentElement\ElementHistoryController::getRecord (   $table,
  $uid 
)
protected

Gets a database record (cached).

Parameters
string$table
int$uid
Returns
‪array|null

Definition at line 455 of file ElementHistoryController.php.

References TYPO3\CMS\Webhooks\Message\$uid.

Referenced by TYPO3\CMS\Backend\Controller\ContentElement\ElementHistoryController\generateTitle().

◆ mainAction()

◆ processSettings()

TYPO3\CMS\Backend\Controller\ContentElement\ElementHistoryController::processSettings ( ServerRequestInterface  $request)
protected

◆ renderDiff()

array TYPO3\CMS\Backend\Controller\ContentElement\ElementHistoryController::renderDiff (   $entry,
  $table,
  $rollbackUid = 0,
bool  $showRollbackLink = false 
)
protected

Renders HTML table-rows with the comparison information of a sys_history entry record

Parameters
array$entry‪sys_history entry record.
string$table‪The table name
int$rollbackUid‪The UID of the record
bool$showRollbackLink‪Whether a rollback link should be shown for each changed field
Returns
‪array array of records

Definition at line 370 of file ElementHistoryController.php.

References $GLOBALS, TYPO3\CMS\Backend\Controller\ContentElement\ElementHistoryController\buildUrl(), TYPO3\CMS\Core\Utility\CHARACTER, and TYPO3\CMS\Backend\Controller\ContentElement\ElementHistoryController\getLanguageService().

Referenced by TYPO3\CMS\Backend\Controller\ContentElement\ElementHistoryController\displayHistory(), and TYPO3\CMS\Backend\Controller\ContentElement\ElementHistoryController\displayMultipleDiff().

◆ setPagePath()

Member Data Documentation

◆ $historyObject

RecordHistory TYPO3\CMS\Backend\Controller\ContentElement\ElementHistoryController::$historyObject
protected

Definition at line 51 of file ElementHistoryController.php.

◆ $recordCache

array TYPO3\CMS\Backend\Controller\ContentElement\ElementHistoryController::$recordCache = array( )
protected

Definition at line 61 of file ElementHistoryController.php.

◆ $returnUrl

string TYPO3\CMS\Backend\Controller\ContentElement\ElementHistoryController::$returnUrl = ''
protected

◆ $showDiff

bool TYPO3\CMS\Backend\Controller\ContentElement\ElementHistoryController::$showDiff = true
protected

Display inline differences or not

Definition at line 57 of file ElementHistoryController.php.

◆ $view

ModuleTemplate TYPO3\CMS\Backend\Controller\ContentElement\ElementHistoryController::$view
protected

Definition at line 63 of file ElementHistoryController.php.