32 protected \ILIAS\DI\UIServices
$ui;
33 protected \ilLanguage
$lng;
43 $this->
ui = $DIC->ui();
44 $this->
lng = $DIC->language();
45 $this->media_cast = $obj;
47 $this->
user = $DIC->user();
48 $this->
ctrl = $DIC->ctrl();
50 $this->player_wrapper =
$DIC->mediaObjects()
67 switch ($next_class) {
68 case strtolower(ilMediaObjectsPlayerWrapperGUI::class):
73 if (in_array($cmd, array(
""))) {
81 $f = $this->
ui->factory();
82 $renderer = $this->
ui->renderer();
87 foreach ($this->media_cast->getSortedItemsArray() as $med_item) {
88 $mob = new \ilObjMediaObject($med_item[
"mob_id"]);
90 $audio = $this->player_wrapper->audio(
92 $this->media_cast->getRefId()
95 if (is_null($audio)) {
99 $item =
$f->item()->standard($mob->getTitle())
100 ->withAudioPlayer($audio)
101 ->withProperties([$this->
lng->txt(
"mcst_duration") => $med_item[
"playtime"]])
102 ->withDescription($mob->getDescription());
105 if ($mob->getVideoPreviewPic() !=
"") {
106 $item = $item->withLeadImage(
107 $f->image()->responsive($mob->getVideoPreviewPic(),
"")
111 if ($this->media_cast->getDownloadable()) {
115 $actions =
$f->dropdown()->standard(array(
116 $f->button()->shy(
$lng->
txt(
"download"), $download),
118 $item = $item->withActions($actions);
125 $list =
$f->panel()->listing()->standard(
126 $this->
lng->txt(
"mcst_audio_files"),
128 $f->item()->group(
"", $items)
132 if ($this->rss_link !==
"") {
134 $f->link()->standard(
137 )->withOpenInNewViewport(
true)
139 $list = $list->withActions(
$f->dropdown()->standard($actions));
142 return $renderer->render($list);
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(\ilObjMediaCast $obj, ilGlobalTemplateInterface $tpl=null, string $rss_link="")
ilGlobalTemplateInterface $tpl
ilObjMediaCast $media_cast
ilMediaObjectsPlayerWrapperGUI $player_wrapper
Class ilCtrl provides processing control methods.
getLinkTargetByClass( $a_class, string $a_cmd=null, string $a_anchor=null, bool $is_async=false, bool $has_xml_style=false)
@inheritDoc
getNextClass($a_gui_class=null)
@inheritDoc
getCmd(string $fallback_command=null)
@inheritDoc
forwardCommand(object $a_gui_object)
@inheritDoc
setParameterByClass(string $a_class, string $a_parameter, $a_value)
@inheritDoc
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...