ILIAS  release_8 Revision v8.24
class.MediaCastManager.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
21namespace ILIAS\MediaCast;
22
28{
29 protected \ILIAS\MediaObjects\MediaType\MediaTypeManager $media_types;
30
31 public function __construct()
32 {
33 global $DIC;
34
35 $this->media_types = $DIC->mediaObjects()
36 ->internal()
37 ->domain()
38 ->mediaType();
39 }
40
41 public function getSuffixesForViewMode(string $view_mode): array
42 {
43 switch ($view_mode) {
44 case \ilObjMediaCast::VIEW_VCAST:
45 return $this->media_types->getVideoSuffixes();
46 break;
47 case \ilObjMediaCast::VIEW_IMG_GALLERY:
48 return $this->media_types->getImageSuffixes();
49 break;
50 case \ilObjMediaCast::VIEW_PODCAST:
51 return $this->media_types->getAudioSuffixes();
52 break;
53 }
54 return [];
55 }
56}
ILIAS MediaObjects MediaType MediaTypeManager $media_types
global $DIC
Definition: feed.php:28
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...