FormatDetailsViewHelper extends AbstractViewHelper uses LogDataTrait

FinalYes

Create detail string from log entry

Internal

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.
stripPathFromFilenames()  : array<string|int, mixed>
Strips path from array of file names
unserializeLogData()  : array<string|int, mixed>|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<string|int, mixed> $substitutes) : string

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

Parameters
$detailString : string
$substitutes : array<string|int, mixed>
Return values
string

stripPathFromFilenames()

Strips path from array of file names

protected static stripPathFromFilenames([array<string|int, mixed> $files = [] ]) : array<string|int, mixed>
Parameters
$files : array<string|int, mixed> = []
Return values
array<string|int, mixed>

unserializeLogData()

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

protected unserializeLogData(mixed $logData) : array<string|int, mixed>|null
Parameters
$logData : mixed
Return values
array<string|int, mixed>|null

        
On this page

Search results