259 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
261 if ($this->presentation_mode) {
262 $ilCtrl->setParameterByClass(
"ilobjmediacastgui",
"presentation",
"1");
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"));
272 $this->tpl->setVariable(
"VAL_ACCESS",
$lng->
txt(
"news_visibility_users"));
274 $this->tpl->parseCurrentBlock();
277 $ilCtrl->setParameterByClass(
"ilobjmediacastgui",
"item_id",
"");
282 $med = $mob->getMediaItem(
"Standard");
284 $this->tpl->setVariable(
289 $this->tpl->setVariable(
294 if (!$this->edit_order) {
295 if ($this->downloadable) {
296 $ilCtrl->setParameterByClass(
"ilobjmediacastgui",
"item_id", $a_set[
"id"]);
300 $a_mob = $mob->getMediaItem($purpose);
301 if (!is_object($a_mob)) {
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();
315 ? $ilCtrl->getLinkTarget($this->parent_obj,
"handlePlayerEvent",
"",
true,
false)
317 if (!is_null($med)) {
318 if ($med->getLocationType() ===
"Reference") {
319 $file = $med->getLocation();
320 if (in_array($med->getFormat(), [
"video/vimeo",
"video/youtube"])) {
321 if (!is_int(strpos($file,
"?"))) {
322 $file .=
"?controls=0";
324 $file .=
"&controls=0";
333 if ($this->media_type->isAudio($med->getFormat())) {
334 $comp =
$ui->factory()->player()->audio(
338 } elseif ($this->media_type->isVideo($med->getFormat())) {
339 $comp =
$ui->factory()->player()->video(
342 } elseif ($this->media_type->isImage($med->getFormat())) {
343 $comp =
$ui->factory()->image()->responsive($file,
"");
345 if (!is_null($comp)) {
346 $this->tpl->setVariable(
"PLAYER",
$ui->renderer()->render($comp));
351 $ilCtrl->setParameterByClass(
"ilobjmediacastgui",
"item_id", $a_set[
"id"]);
352 if ($ilAccess->checkAccess(
"write",
"", $this->request->getRefId()) &&
353 !$this->presentation_mode) {
355 if (!is_int(strpos($med->getFormat(),
"image/"))) {
356 $this->tpl->setVariable(
"TXT_DET_PLAYTIME",
$lng->
txt(
"mcst_det_playtime"));
357 $this->tpl->setVariable(
359 $ilCtrl->getLinkTargetByClass(
"ilobjmediacastgui",
"determinePlaytime")
362 $this->tpl->parseCurrentBlock();
364 $this->tpl->setCurrentBlock(
"edit_checkbox");
365 $this->tpl->setVariable(
"VAL_ID", $a_set[
"id"]);
366 $this->tpl->parseCurrentBlock();
370 $this->tpl->setCurrentBlock(
"edit_order");
371 $this->tpl->setVariable(
"VAL_ID", $a_set[
"id"]);
372 $this->tpl->setVariable(
"VAL_ORDER", $a_set[
"order"]);
373 $this->tpl->parseCurrentBlock();
378 if (!$this->presentation_mode) {
379 if ($a_set[
"mob_cnt_download"] > 0) {
380 $this->tpl->setCurrentBlock(
"prop");
381 $this->tpl->setVariable(
"TXT_PROP",
$lng->
txt(
"mcst_download_cnt"));
382 $this->tpl->setVariable(
"VAL_PROP", $a_set[
"mob_cnt_download"]);
383 $this->tpl->parseCurrentBlock();
385 if ($a_set[
"mob_cnt_play"] > 0) {
386 $this->tpl->setCurrentBlock(
"prop");
387 $this->tpl->setVariable(
"TXT_PROP",
$lng->
txt(
"mcst_play_cnt"));
388 $this->tpl->setVariable(
"VAL_PROP", $a_set[
"mob_cnt_play"]);
389 $this->tpl->parseCurrentBlock();
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
static signFile(string $path_to_file)