ILIAS  release_7 Revision v7.30-3-g800a261c036
trait.ilObjFilePreviewHandler.php
Go to the documentation of this file.
1<?php
2
7trait ilObjFilePreviewHandler
8{
12 protected function deletePreview() : void
13 {
14 // only normal files are supported
15 if ($this->getMode() !== self::MODE_OBJECT) {
16 return;
17 }
18 ilPreview::deletePreview($this->getId());
19 }
20
26 protected function createPreview($force = false) : void
27 {
28 // only normal files are supported
29 if ($this->getMode() != self::MODE_OBJECT) {
30 return;
31 }
32 ilPreview::createPreview($this, $force);
33 }
34}
An exception for terminatinating execution or to throw for unit testing.
static deletePreview($a_obj_id)
Deletes the preview for the object with the specified id.
static createPreview($a_obj, $a_force=false)
Creates the preview for the object with the specified id.