FormatDetailsViewHelper

final class \TYPO3\CMS\Belog\ViewHelpers\FormatDetailsViewHelper

Extends
AbstractViewHelper
Uses
LogDataTrait

ViewHelper to create detail string from a log entry.

  <belog:formatDetails logEntry="{logItem}" />

Table of Contents

Methods

initializeArguments()  : void
render()  : string
Create formatted detail string from log row.
formatLogDetails()  : string
Replaces a string with placeholders (%s or {myPlaceholder}) with its substitutes.
formatLogDetailsStatic()  : string
Static version for ViewHelpers etc.
unserializeLogData()  : array|null
Useful for handling old serialized data, which might have been migrated to JSON encoded properties already.

Methods

initializeArguments()

public initializeArguments() : void

render()

Create formatted detail string from log row.

public render() : string

The method handles two properties of the model: details and logData Details is a string with possible %s placeholders, and logData an array with the substitutions. Furthermore, possible files in logData are stripped to their basename if the action logged was a file action

Return values

string

formatLogDetails()

Replaces a string with placeholders (%s or {myPlaceholder}) with its substitutes.

protected formatLogDetails(string $detailString, mixed $substitutes) : string

Parameters

$detailString : string
$substitutes : mixed

Return values

string

formatLogDetailsStatic()

Static version for ViewHelpers etc.

protected static formatLogDetailsStatic(string $detailString, array $substitutes) : string

Replaces a string with placeholders (%s or {myPlaceholder}) with its substitutes.

Parameters

$detailString : string
$substitutes : array

Return values

string

unserializeLogData()

Useful for handling old serialized data, which might have been migrated to JSON encoded properties already.

protected unserializeLogData(mixed $logData) : array|null

Parameters

$logData : mixed

Return values

array|null
On this page