Initial commit
This commit is contained in:
commit
388079e6bb
1108 changed files with 330121 additions and 0 deletions
29
kirby/src/Panel/Ui/FilePreviews/PdfFilePreview.php
Normal file
29
kirby/src/Panel/Ui/FilePreviews/PdfFilePreview.php
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
<?php
|
||||
|
||||
namespace Kirby\Panel\Ui\FilePreviews;
|
||||
|
||||
use Kirby\Cms\File;
|
||||
use Kirby\Panel\Ui\FilePreview;
|
||||
|
||||
/**
|
||||
* @package Kirby Panel
|
||||
* @author Nico Hoffmann <nico@getkirby.com>
|
||||
* @link https://getkirby.com
|
||||
* @copyright Bastian Allgeier
|
||||
* @license https://getkirby.com/license
|
||||
* @since 5.0.0
|
||||
* @unstable
|
||||
*/
|
||||
class PdfFilePreview extends FilePreview
|
||||
{
|
||||
public function __construct(
|
||||
public File $file,
|
||||
public string $component = 'k-pdf-file-preview'
|
||||
) {
|
||||
}
|
||||
|
||||
public static function accepts(File $file): bool
|
||||
{
|
||||
return $file->extension() === 'pdf';
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue