StandardContentPreviewRenderer

final readonly class \TYPO3\CMS\Backend\Preview\StandardContentPreviewRenderer

Implements
PreviewRendererInterface

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 by custom implementations by changing this TCA configuration.

See also PreviewRendererInterface documentation.

Attributes

#[Autoconfigure]
$public: true

Table of Contents

Interfaces

PreviewRendererInterface
Interface PreviewRendererInterface

Methods

__construct()  : mixed
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.

Methods

__construct()

public __construct(RecordFieldPreviewProcessor $fieldProcessor, TcaSchemaFactory $tcaSchemaFactory, LocalizationRepository $localizationRepository, BackendLayoutView $backendLayoutView, IconFactory $iconFactory, PageAncestryResolver $pageAncestryResolver, PagePathRenderer $pagePathRenderer) : mixed

Parameters

$fieldProcessor : RecordFieldPreviewProcessor
$tcaSchemaFactory : TcaSchemaFactory
$localizationRepository : LocalizationRepository
$backendLayoutView : BackendLayoutView
$iconFactory : IconFactory
$pageAncestryResolver : PageAncestryResolver
$pagePathRenderer : PagePathRenderer

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
On this page