ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ThumbsGUI.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
25
27{
29 protected \ILIAS\MediaObjects\MediaObjectManager $media_manager;
30
31 public function __construct(
32 protected InternalDomainService $domain,
33 protected InternalGUIService $gui
34 ) {
35 $this->thumbs_manager = $this->domain->thumbs();
36 }
37
38 public function getThumbHtml(int $mob_id): string
39 {
40 $mob = new \ilObjMediaObject($mob_id);
41 $f = $this->gui->ui()->factory();
42 $r = $this->gui->ui()->renderer();
43 $im = $f->image()->responsive(
44 $this->thumbs_manager->getThumbSrc($mob_id),
45 $mob->getTitle()
46 );
47 return "<div class='ilMediaPoolPreviewThumbnail'>" .
48 $r->render($im) .
49 "</div>";
50 }
51}
__construct(protected InternalDomainService $domain, protected InternalGUIService $gui)
Definition: ThumbsGUI.php:31
ILIAS MediaObjects MediaObjectManager $media_manager
Definition: ThumbsGUI.php:29