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.
View source (opens new window)
# Public Methods
Method | Description |
---|---|
getPreviewHtml() | Returns the asset preview HTML. |
# getPreviewHtml()
Returns the asset preview HTML.
View source (opens new window)
Arguments
$variables
(array (opens new window)) – Additional variables to pass to the template.
Returns
string (opens new window) – The preview modal HTML
Throws
- yii\base\NotSupportedException (opens new window)
if the asset can’t be previewed