AssetPreviewHandlerInterface ​
- Type
- Interface
- Namespace
- craft\base
- Implemented by
- craft\assetpreviews\Image, craft\assetpreviews\Pdf, craft\assetpreviews\Text, craft\assetpreviews\Video, craft\base\AssetPreviewHandler
- Since
- 3.4.0
AssetPreviewHandlerInterface defines the common interface to be implemented by classes that provide asset previewing functionality.
Public Methods ​
Method | Description |
---|---|
getPreviewHtml() | Returns the asset preview HTML. |
getPreviewHtml()
​
Returns the asset preview HTML.
Arguments ​
$variables
(array) – Additional variables to pass to the template.
Returns ​
string – The preview modal HTML
Throws ​
- yii\base\NotSupportedException
if the asset can’t be previewed