83 : string
84 {
85 $f = $this->
ui->factory();
89
90 $items = [];
91 foreach ($this->media_cast->getSortedItemsArray() as $med_item) {
92 $mob = new \ilObjMediaObject($med_item["mob_id"]);
94
95 $audio = $this->player_wrapper->audio(
96 $mob,
97 $this->media_cast->getRefId()
98 );
99
100 if (is_null($audio)) {
101 continue;
102 }
103
104 $actions = [];
105 $properties = [];
106 $properties[$this->
lng->txt(
"mcst_duration")] = $med_item[
"playtime"];
107
108 if ($this->mc_manager->commentsActive()) {
109 $comments_gui = $this->gui->comments()->commentGUI(
110 $this->media_cast->getRefId(),
111 (int) $med_item["id"]
112 );
113
114 $properties[$this->
lng->txt(
"comments")] =
$renderer->render(
$f->legacy()->content($comments_gui->getNumber()));
115 $actions[] = $comments_gui->getTriggerShyButton();
116 }
117
118 $item =
$f->item()->standard($mob->getTitle())
119 ->withAudioPlayer($audio)
120 ->withProperties($properties)
121 ->withDescription($mob->getDescription());
122
123
124 if ($mob->getVideoPreviewPic() != "") {
125 $item = $item->withLeadImage(
126 $f->image()->responsive($mob->getVideoPreviewPic(),
"")
127 );
128 }
129
130 if ($this->media_cast->getDownloadable()) {
133 $actions[] =
$f->button()->shy(
$lng->
txt(
"download"), $download);
134 }
135
136 if (count($actions) > 0) {
137 $dd =
$f->dropdown()->standard($actions);
138 $item = $item->withActions($dd);
139 }
140
141 $items[] = $item;
142 }
143
144
145 $list =
$f->panel()->listing()->standard(
146 $this->
lng->txt(
"mcst_audio_files"),
147 [
148 $f->item()->group(
"", $items)
149 ]
150 );
151
152 if ($this->rss_link !== "") {
153 $actions = [
154 $f->link()->standard(
156 $this->rss_link
157 )->withOpenInNewViewport(true)
158 ];
159 $list = $list->withActions(
$f->dropdown()->standard($actions));
160 }
161
163 }
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...