ILIAS  release_8 Revision v8.24
trait.ilObjFilePreviewHandler.php
Go to the documentation of this file.
1<?php
2
23trait ilObjFilePreviewHandler
24{
28 protected function deletePreview(): void
29 {
30 // only normal files are supported
31 if ($this->getMode() !== self::MODE_OBJECT) {
32 return;
33 }
35 }
36
42 protected function createPreview(bool $force = false): void
43 {
44 // only normal files are supported
45 if ($this->getMode() != self::MODE_OBJECT) {
46 return;
47 }
48 ilPreview::createPreview($this, $force);
49 }
50}
static deletePreview(int $a_obj_id)
Deletes the preview for the object with the specified id.
static createPreview(\ilObject $a_obj, bool $a_force=false)
Creates the preview for the object with the specified id.