ElementHistoryController

Controller for showing the history module of TYPO3s backend.

Internal

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

Attributes
#[AsController]

Table of Contents

Properties

$historyObject  : RecordHistory
$iconFactory  : IconFactory
$moduleTemplateFactory  : ModuleTemplateFactory
$recordCache  : array<string|int, mixed>
$returnUrl  : string
$showDiff  : bool
Display inline differences or not
$uriBuilder  : UriBuilder
$view  : ModuleTemplate

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<string|int, mixed>|null
Gets a database record (cached).
processSettings()  : array<string|int, mixed>
renderDiff()  : array<string|int, mixed>
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<string|int, mixed> $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<string|int, mixed> $overrideParameters = [] ]) : string
Parameters
$overrideParameters : array<string|int, mixed> = []
Return values
string

displayHistory()

Shows the full change log

protected displayHistory(array<string|int, mixed> $historyEntries) : mixed
Parameters
$historyEntries : array<string|int, mixed>

displayMultipleDiff()

Displays a diff over multiple fields including rollback links

protected displayMultipleDiff(array<string|int, mixed> $diff) : mixed
Parameters
$diff : array<string|int, mixed>

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<string|int, mixed>|null
Parameters
$table : string
$uid : int
Return values
array<string|int, mixed>|null

processSettings()

protected processSettings(ServerRequestInterface $request) : array<string|int, mixed>
Parameters
$request : ServerRequestInterface
Return values
array<string|int, mixed>

renderDiff()

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

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

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<string|int, mixed>

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

Search results