StandardPreviewRendererResolver
Scans TCA configuration to detect:
- TCA.$table.types.$typeFromTypeField.previewRenderer
- TCA.$table.ctrl.previewRenderer
Depending on which one is defined and checking the first, type-specific variant first.
Attributes
- #[Autoconfigure]
- $public: true
Table of Contents
Properties
Methods
Properties
$tcaSchemaFactory read-only
protected
TcaSchemaFactory
$tcaSchemaFactory
Methods
__construct()
public
__construct(TcaSchemaFactory $tcaSchemaFactory) : mixed
Parameters
- $tcaSchemaFactory : TcaSchemaFactory
resolveRendererFor()
public
resolveRendererFor(string $table, array<string|int, mixed> $row, int $pageUid) : PreviewRendererInterface
Parameters
- $table : string
-
The name of the table the returned PreviewRenderer must work with
- $row : array<string|int, mixed>
-
A record from $table which will be previewed - allows returning a different PreviewRenderer based on record attributes
- $pageUid : int
-
The UID of the page on which the preview will be rendered - allows returning a different PreviewRenderer based on for example pageTSconfig