FormatDetailsViewHelper extends AbstractViewHelper uses CompileWithRenderStatic, LogDataTrait
This class is the implementation of a Fluid ViewHelper.
View this class in the TYPO3 ViewHelper reference: <.typo3.cms.belog.s.formatdetails>
Create detail string from log entry
Table of Contents
Methods
- initializeArguments() : void
- renderStatic() : 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
renderStatic()
Create formatted detail string from log row.
public
static renderStatic(LogEntry} $arguments, Closure $renderChildrenClosure, RenderingContextInterface $renderingContext) : 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
Parameters
- $arguments : LogEntry}
- $renderChildrenClosure : Closure
- $renderingContext : RenderingContextInterface
Return values
stringformatLogDetails()
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
stringformatLogDetailsStatic()
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
stringstripPathFromFilenames()
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