250 : void
251 {
255 $size = 0;
257
259 $enable_internal_rss = $news_set->get("enable_rss_for_internal");
260
261 if ($this->presentation_mode) {
262 $ilCtrl->setParameterByClass("ilobjmediacastgui", "presentation", "1");
263 }
264
265
266 if ($enable_internal_rss && !$this->presentation_mode) {
267 $this->tpl->setCurrentBlock("access");
268 $this->tpl->setVariable(
"TXT_ACCESS",
$lng->
txt(
"news_news_item_visibility"));
270 $this->tpl->setVariable(
"VAL_ACCESS",
$lng->
txt(
"news_visibility_public"));
271 } else {
272 $this->tpl->setVariable(
"VAL_ACCESS",
$lng->
txt(
"news_visibility_users"));
273 }
274 $this->tpl->parseCurrentBlock();
275 }
276
277 $ilCtrl->setParameterByClass("ilobjmediacastgui", "item_id", "");
278
280
282 $med = $mob->getMediaItem("Standard");
283
284 $this->tpl->setVariable(
285 "VAL_DESCRIPTION",
286 $a_set["content"]
287 );
288
289 $this->tpl->setVariable(
290 "TXT_DURATION",
292 );
293
294 if (!$this->edit_order) {
295 if ($this->downloadable) {
296 $ilCtrl->setParameterByClass("ilobjmediacastgui", "item_id", $a_set["id"]);
297
298
300 $a_mob = $mob->getMediaItem($purpose);
301 if (!is_object($a_mob)) {
302 continue;
303 }
304 $ilCtrl->setParameterByClass("ilobjmediacastgui", "purpose", $a_mob->getPurpose());
306 $this->tpl->setCurrentBlock("downloadable");
307 $this->tpl->setVariable(
"TXT_DOWNLOAD",
$lng->
txt(
"mcst_download_" . strtolower($a_mob->getPurpose())));
308 $this->tpl->setVariable("CMD_DOWNLOAD", $ilCtrl->getLinkTargetByClass("ilobjmediacastgui", "downloadItem"));
309 $this->tpl->parseCurrentBlock();
310 }
311 }
312
313
315 ? $ilCtrl->getLinkTarget($this->parent_obj, "handlePlayerEvent", "", true, false)
316 : "";
317 if (!is_null($med)) {
318 $file = $mob->getStandardSrc();
319 $comp = null;
320 if ($this->media_type->isAudio($med->getFormat())) {
321 $comp =
$ui->factory()->player()->audio(
322 $file,
323 ""
324 );
325 } elseif ($this->media_type->isVideo($med->getFormat())) {
326 $comp =
$ui->factory()->player()->video(
327 $file
328 );
329 } elseif ($this->media_type->isImage($med->getFormat())) {
330 $comp =
$ui->factory()->image()->responsive($file,
"");
331 }
332 if (!is_null($comp)) {
333 $this->tpl->setVariable(
"PLAYER",
$ui->renderer()->render($comp));
334 }
335 }
336
337
338 $ilCtrl->setParameterByClass("ilobjmediacastgui", "item_id", $a_set["id"]);
339 if ($ilAccess->checkAccess("write", "", $this->request->getRefId()) &&
340 !$this->presentation_mode) {
341
342 if (!is_int(strpos($med->getFormat(), "image/"))) {
343 $this->tpl->setVariable(
"TXT_DET_PLAYTIME",
$lng->
txt(
"mcst_det_playtime"));
344 $this->tpl->setVariable(
345 "CMD_DET_PLAYTIME",
346 $ilCtrl->getLinkTargetByClass("ilobjmediacastgui", "determinePlaytime")
347 );
348 }
349 $this->tpl->parseCurrentBlock();
350
351 $this->tpl->setCurrentBlock("edit_checkbox");
352 $this->tpl->setVariable("VAL_ID", $a_set["id"]);
353 $this->tpl->parseCurrentBlock();
354
355 }
356 } else {
357 $this->tpl->setCurrentBlock("edit_order");
358 $this->tpl->setVariable("VAL_ID", $a_set["id"]);
359 $this->tpl->setVariable("VAL_ORDER", $a_set["order"]);
360 $this->tpl->parseCurrentBlock();
361
362 }
363
364
365 if (!$this->presentation_mode) {
366 if ($a_set["mob_cnt_download"] > 0) {
367 $this->tpl->setCurrentBlock("prop");
368 $this->tpl->setVariable(
"TXT_PROP",
$lng->
txt(
"mcst_download_cnt"));
369 $this->tpl->setVariable("VAL_PROP", $a_set["mob_cnt_download"]);
370 $this->tpl->parseCurrentBlock();
371 }
372 if ($a_set["mob_cnt_play"] > 0) {
373 $this->tpl->setCurrentBlock("prop");
374 $this->tpl->setVariable(
"TXT_PROP",
$lng->
txt(
"mcst_play_cnt"));
375 $this->tpl->setVariable("VAL_PROP", $a_set["mob_cnt_play"]);
376 $this->tpl->parseCurrentBlock();
377 }
378 }
379 }
380 }
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...
static _exists(int $id, bool $reference=false, ?string $type=null)
checks if an object exists in object_data