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