StandardContentPreviewRenderer

class \TYPO3\CMS\Backend\Preview\StandardContentPreviewRenderer

Implements
PreviewRendererInterface, LoggerAwareInterface
Uses
LoggerAwareTrait

Legacy preview rendering refactored from PageLayoutView.

Provided as default preview rendering mechanism via StandardPreviewRendererResolver which detects the renderer based on TCA configuration.

Can be replaced and/or subclassed by custom implementations by changing this TCA configuration.

See also PreviewRendererInterface documentation.

Tags

todo

Evaluate class and streamline to properly use DI

Table of Contents

Interfaces

PreviewRendererInterface
Interface PreviewRendererInterface
LoggerAwareInterface

Methods

renderPageModulePreviewContent()  : string
Dedicated method for rendering preview body HTML for the page module only. Receives the GridColumnItem that contains the record for which a preview should be rendered and returned.
renderPageModulePreviewFooter()  : string
Render a footer for the record
renderPageModulePreviewHeader()  : string
Dedicated method for rendering preview header HTML for the page module only. Receives the GridColumnItem that contains the record for which a preview header should be rendered and returned.
wrapPageModulePreview()  : string
Dedicated method for wrapping a preview header and body HTML. Receives $item, an instance of GridColumnItem holding among other things the record, which can be used to determine appropriate wrapping.
generateListForMenuContentTypes()  : string
Generates a list of selected pages or categories for the menu content types
getBackendUser()  : BackendUserAuthentication
getIconFactory()  : IconFactory
getLanguageService()  : LanguageService
getProcessedValue()  : void
getThumbCodeUnlinked()  : string
linkEditContent()  : string
Will create a link on the input string and possibly a big button after the string which links to editing in the RTE. Used for content element content displayed so the user can click the content / "Edit in Rich Text Editor" button
renderText()  : string
Processing of larger amounts of text (usually from RTE/bodytext fields) with word wrapping etc.
translateShortcutRecord()  : RawRecord

Methods

renderPageModulePreviewContent()

Dedicated method for rendering preview body HTML for the page module only. Receives the GridColumnItem that contains the record for which a preview should be rendered and returned.

public renderPageModulePreviewContent(GridColumnItem $item) : string

Parameters

$item : GridColumnItem

Return values

string

renderPageModulePreviewFooter()

Render a footer for the record

public renderPageModulePreviewFooter(GridColumnItem $item) : string

Parameters

$item : GridColumnItem

Return values

string

renderPageModulePreviewHeader()

Dedicated method for rendering preview header HTML for the page module only. Receives the GridColumnItem that contains the record for which a preview header should be rendered and returned.

public renderPageModulePreviewHeader(GridColumnItem $item) : string

Parameters

$item : GridColumnItem

Return values

string

wrapPageModulePreview()

Dedicated method for wrapping a preview header and body HTML. Receives $item, an instance of GridColumnItem holding among other things the record, which can be used to determine appropriate wrapping.

public wrapPageModulePreview(string $previewHeader, string $previewContent, GridColumnItem $item) : string

Parameters

$previewHeader : string
$previewContent : string
$item : GridColumnItem

Return values

string

generateListForMenuContentTypes()

Generates a list of selected pages or categories for the menu content types

protected generateListForMenuContentTypes(array $record, string $contentType) : string

Parameters

$record : array

row from pages

$contentType : string

Return values

string

getProcessedValue()

protected getProcessedValue(GridColumnItem $item, string|array $fieldList, array &$info) : void

Parameters

$item : GridColumnItem
$fieldList : string|array
$info : array

getThumbCodeUnlinked()

protected getThumbCodeUnlinked(iterable<string|int, mixed>|FileReference $fileReferences) : string

Parameters

$fileReferences : iterable<string|int, mixed>|FileReference

Return values

string

linkEditContent()

Will create a link on the input string and possibly a big button after the string which links to editing in the RTE. Used for content element content displayed so the user can click the content / "Edit in Rich Text Editor" button

protected linkEditContent(string $linkText, array $row[, string $table = 'tt_content' ]) : string

Parameters

$linkText : string

String to link. Must be prepared for HTML output.

$row : array

The row.

$table : string = 'tt_content'

Return values

string —

If the whole thing was editable and $linkText is not empty $linkText is returned with link around. Otherwise just $linkText.

renderText()

Processing of larger amounts of text (usually from RTE/bodytext fields) with word wrapping etc.

protected renderText(string $input) : string

Parameters

$input : string

Input string

Return values

string —

Output string

On this page