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) : mixed
Parameters
- $fieldProcessor : RecordFieldPreviewProcessor
- $tcaSchemaFactory : TcaSchemaFactory
- $localizationRepository : LocalizationRepository
- $backendLayoutView : BackendLayoutView
- $iconFactory : IconFactory
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
stringrenderPageModulePreviewFooter()
Render a footer for the record
public
renderPageModulePreviewFooter(GridColumnItem $item) : string
Parameters
- $item : GridColumnItem
Return values
stringrenderPageModulePreviewHeader()
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
stringwrapPageModulePreview()
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