ElementHistoryController

class \TYPO3\CMS\Backend\Controller\ContentElement\ElementHistoryController

Controller for showing the history module of TYPO3s backend

Tags

see
RecordHistory

Table of Contents

Properties

$historyObject  : RecordHistory
$iconFactory  : IconFactory
$moduleTemplate  : ModuleTemplate
ModuleTemplate object
$moduleTemplateFactory  : ModuleTemplateFactory
$recordCache  : array
$returnUrl  : string
$showDiff  : bool
Display inline differences or not
$uriBuilder  : UriBuilder
$view  : StandaloneView

Methods

__construct()  : mixed
mainAction()  : ResponseInterface
Injects the request object for the current request or sub request As this controller goes only through the main() method, it is rather simple for now
buildUrl()  : string
Generates the URL for a link to the current page
displayHistory()  : mixed
Shows the full change log
displayMultipleDiff()  : mixed
Displays a diff over multiple fields including rollback links
generateTitle()  : string
Generates the title and puts the record title behind
getBackendUser()  : BackendUserAuthentication
getButtons()  : void
getEditLockFromElement()  : bool
Get the editlock value from page of a history element
getLanguageService()  : LanguageService
getRecord()  : array|null
Gets a database record (cached).
initializeView()  : StandaloneView
Returns a new standalone view, shorthand function
processSettings()  : array
renderDiff()  : array
Renders HTML table-rows with the comparison information of a sys_history entry record
setPagePath()  : mixed
Creates the correct path to the current record

Properties

$recordCache

protected array $recordCache = []

$returnUrl

protected string $returnUrl = ''

$showDiff

Display inline differences or not

protected bool $showDiff = true

Methods

mainAction()

Injects the request object for the current request or sub request As this controller goes only through the main() method, it is rather simple for now

public mainAction(ServerRequestInterface $request) : ResponseInterface

Parameters

$request : ServerRequestInterface

the current request

Return values

ResponseInterface —

the response with the content

buildUrl()

Generates the URL for a link to the current page

protected buildUrl([array $overrideParameters = [] ]) : string

Parameters

$overrideParameters : array = []

Return values

string

displayHistory()

Shows the full change log

protected displayHistory(array $historyEntries) : mixed

Parameters

$historyEntries : array

displayMultipleDiff()

Displays a diff over multiple fields including rollback links

protected displayMultipleDiff(array $diff) : mixed

Parameters

$diff : array

Difference array

generateTitle()

Generates the title and puts the record title behind

protected generateTitle(string $table, string $uid) : string

Parameters

$table : string
$uid : string

Return values

string

getEditLockFromElement()

Get the editlock value from page of a history element

protected getEditLockFromElement(string $tableName, int $elementUid) : bool

Parameters

$tableName : string
$elementUid : int

Return values

bool

getRecord()

Gets a database record (cached).

protected getRecord(string $table, int $uid) : array|null

Parameters

$table : string
$uid : int

Return values

array|null

processSettings()

protected processSettings(ServerRequestInterface $request) : array

Parameters

$request : ServerRequestInterface

Return values

array

renderDiff()

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

protected renderDiff(array $entry, string $table[, int $rollbackUid = 0 ][, bool $showRollbackLink = false ]) : array

Parameters

$entry : array

sys_history entry record.

$table : string

The table name

$rollbackUid : int = 0

The UID of the record

$showRollbackLink : bool = false

Whether a rollback link should be shown for each changed field

Return values

array —

array of records

setPagePath()

Creates the correct path to the current record

protected setPagePath(string $table, int $uid) : mixed

Parameters

$table : string
$uid : int
On this page