27 protected \ILIAS\MediaCast\InternalGUIService
$gui;
34 protected \ILIAS\DI\UIServices
$ui;
35 protected \ilLanguage
$lng;
45 $this->
ui = $DIC->ui();
46 $this->
lng = $DIC->language();
47 $this->media_cast = $obj;
49 $this->
user = $DIC->user();
50 $this->
ctrl = $DIC->ctrl();
52 $this->player_wrapper =
$DIC->mediaObjects()
57 $this->mc_manager =
$DIC->mediaCast()->internal()->domain()->mediaCast($obj);
58 $this->gui =
$DIC->mediaCast()->internal()->gui();
71 switch ($next_class) {
72 case strtolower(ilMediaObjectsPlayerWrapperGUI::class):
77 if (in_array($cmd, array(
""))) {
85 $f = $this->
ui->factory();
91 foreach ($this->media_cast->getSortedItemsArray() as $med_item) {
92 $mob = new \ilObjMediaObject($med_item[
"mob_id"]);
95 $audio = $this->player_wrapper->audio(
97 $this->media_cast->getRefId()
100 if (is_null($audio)) {
106 $properties[$this->
lng->txt(
"mcst_duration")] = $med_item[
"playtime"];
108 if ($this->mc_manager->commentsActive()) {
109 $comments_gui = $this->gui->comments()->commentGUI(
110 $this->media_cast->getRefId(),
111 (
int) $med_item[
"id"]
114 $properties[$this->
lng->txt(
"comments")] =
$renderer->render(
$f->legacy()->content($comments_gui->getNumber()));
115 $actions[] = $comments_gui->getTriggerShyButton();
118 $item =
$f->item()->standard($mob->getTitle())
119 ->withAudioPlayer($audio)
120 ->withProperties($properties)
121 ->withDescription($mob->getDescription());
124 if ($mob->getVideoPreviewPic() !=
"") {
125 $item = $item->withLeadImage(
126 $f->image()->responsive($mob->getVideoPreviewPic(),
"")
130 if ($this->media_cast->getDownloadable()) {
133 $actions[] =
$f->button()->shy(
$lng->
txt(
"download"), $download);
136 if (count($actions) > 0) {
137 $dd =
$f->dropdown()->standard($actions);
138 $item = $item->withActions($dd);
145 $list =
$f->panel()->listing()->standard(
146 $this->
lng->txt(
"mcst_audio_files"),
148 $f->item()->group(
"", $items)
152 if ($this->rss_link !==
"") {
154 $f->link()->standard(
157 )->withOpenInNewViewport(
true)
159 $list = $list->withActions(
$f->dropdown()->standard($actions));
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
ILIAS MediaCast MediaCastManager $mc_manager
ILIAS MediaCast InternalGUIService $gui
ilMediaObjectsPlayerWrapperGUI $player_wrapper
Class ilCtrl provides processing control methods.
getNextClass($a_gui_class=null)
@inheritDoc
forwardCommand(object $a_gui_object)
@inheritDoc
getCmd(?string $fallback_command=null)
@inheritDoc
setParameterByClass(string $a_class, string $a_parameter, $a_value)
@inheritDoc
getLinkTargetByClass( $a_class, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false, bool $has_xml_style=false)
@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...