FormPagePreviewRenderer implements PreviewRendererInterface
Read onlyYes
FinalYes
Contains a preview rendering for the page module of CType="form_formframework"
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 to display in page module below the body of the item's preview.
- 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(FormPersistenceManagerInterface $formPersistenceManager, FlashMessageService $flashMessageService, RecordFieldPreviewProcessor $fieldProcessor, StandardContentPreviewRenderer $standardContentPreviewRenderer, LoggerInterface $logger) : mixed
Parameters
- $formPersistenceManager : FormPersistenceManagerInterface
- $flashMessageService : FlashMessageService
- $fieldProcessor : RecordFieldPreviewProcessor
- $standardContentPreviewRenderer : StandardContentPreviewRenderer
- $logger : LoggerInterface
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 to display in page module below the body of the item's preview.
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