19 declare(strict_types=1);
    42         $this->media_manager = $this->domain->mediaObject();
    43         $this->image_converters = 
new Images(
true);
    49         return "thumbs/Standard.png";
    57         $mob = new \ilObjMediaObject($mob_id);
    58         $item = $mob->getMediaItem(
"Standard");
    60         if ($item?->getFormat() === 
"image/svg+xml") {
    61             return $mob->getStandardSrc();
    66         if ($this->media_manager->hasLocalFile($mob_id, $thumb_path)) {
    67             return $this->media_manager->getLocalSrc($mob_id, $thumb_path);
    72         if ($preview_src !== 
"") {
    77         if ($item?->getLocationType() === 
"LocalFile") {
    78             if ($item?->getThumbTried() !== 
"y") {
    81                     $item?->getLocation(),
    85                 $item?->writeThumbTried(
"y");
    86                 if ($this->media_manager->hasLocalFile($mob_id, $thumb_path)) {
    87                     return $this->media_manager->getLocalSrc($mob_id, $thumb_path);
    91             if (str_starts_with($item?->getFormat(), 
"image/")) {
    92                 return $item?->getLocation();
    97         return \ilUtil::getImagePath(
"standard/icon_mob.svg");
   104         string $target_location,
   107         $is_image = is_int(strpos($format, 
"image/"));
   109             if (!$this->media_manager->hasLocalFile($mob_id, $location)) {
   117             $tempStream = fopen(
'php://temp', 
'w+');
   118             stream_copy_to_stream($this->media_manager->getLocationStream($mob_id, $location)->detach(), $tempStream);
   120             $stream = 
new Stream($tempStream);
   122             $converter = $this->image_converters->resizeToFixedSize(
   127                 $this->output_options
   128                     ->withQuality($image_quality)
   131             $this->media_manager->addStream(
   134                 $converter->getStream()
   148             "mob_vpreview.jpeg");
   149         foreach ($ppics as $pic) {
   150             if ($this->media_manager->hasLocalFile($mob_id, $pic)) {
   151                 return $this->media_manager->getLocalSrc($mob_id, $pic);
 
$location
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...