35     protected \ILIAS\MediaObjects\MediaType\MediaTypeManager 
$media_type;
    36     protected \ILIAS\MediaCast\InternalGUIService 
$gui;
    54         bool $a_call_by_reference,
    55         bool $a_prepare_output = 
true    59         $this->
ctrl = $DIC->ctrl();
    60         $this->
lng = $DIC->language();
    61         $this->
user = $DIC->user();
    62         $this->
tabs = $DIC->tabs();
    63         $this->tpl = $DIC[
"tpl"];
    64         $this->
access = $DIC->access();
    65         $this->
toolbar = $DIC->toolbar();
    67         $this->log = $DIC[
"ilLog"];
    68         $this->
help = $DIC[
"ilHelp"];
    69         $this->
locator = $DIC[
"ilLocator"];
    70         $ilCtrl = $DIC->ctrl();
    71         $lng = $DIC->language();
    72         $this->mc_request = $DIC->mediaCast()
    83         $ilCtrl->saveParameter($this, 
"item_id");
    88             $this->mc_manager = $DIC->mediaCast()->internal()
    89                                     ->domain()->mediaCast($this->
object);
    91         $this->gui = $DIC->mediaCast()->internal()->gui();
    92         $this->media_type = $DIC->mediaObjects()->internal()->domain()->mediaType();
    93         $this->video_gui = $DIC->mediaObjects()->internal()->gui()->video();
   101         $next_class = $this->
ctrl->getNextClass($this);
   102         $cmd = $this->
ctrl->getCmd();
   105         switch ($next_class) {
   106             case "ilmediacreationgui":
   109                 $this->
ctrl->setReturn($this, 
"listItems");
   110                 $ilTabs->activateTab(
"content");
   113                 switch ($this->
object->getViewMode()) {
   126                 }, 
function ($mob_id, $long_desc) {
   128                 }, 
function ($mob_ids) {
   130                 }, 
function ($mob_id) {
   132                 }, 
function ($mob_id) {
   135                 $this->
ctrl->forwardCommand($creation);
   138             case "ilinfoscreengui":
   147                 $ilTabs->activateTab(
"export");
   149                 $exp_gui->addFormat(
"xml");
   150                 $ret = $this->
ctrl->forwardCommand($exp_gui);
   154             case 'ilpermissiongui':
   155                 $ilTabs->activateTab(
"id_permissions");
   157                 $ret = $this->
ctrl->forwardCommand($perm_gui);
   160             case 'ilobjectcopygui':
   162                 $cp->setType(
'mcst');
   163                 $this->
ctrl->forwardCommand($cp);
   166             case "ilcommonactiondispatchergui":
   168                 $this->
ctrl->forwardCommand($gui);
   171             case "illearningprogressgui":
   172                 $ilTabs->activateTab(
'learning_progress');
   175                     $this->
object->getRefId(),
   176                     $this->mc_request->getUserId() ?: $ilUser->getId()
   178                 $this->
ctrl->forwardCommand($new_gui);
   179                 $this->tabs_gui->setTabActive(
'learning_progress');
   182             case "mcstimagegallerygui":
   183                 $view = new \McstImageGalleryGUI($this->
object, $this->tpl, $this->
getFeedLink());
   184                 $this->
ctrl->forwardCommand($view);
   187             case "mcstpodcastgui":
   188                 $view = new \McstPodcastGUI($this->
object, $this->tpl, $this->
getFeedLink());
   189                 $this->
ctrl->forwardCommand($view);
   192             case strtolower(ilCommentGUI::class):
   201                 if ($cmd != 
"infoScreenObject") {
   215         $forms = array(self::CFORM_NEW => $this->
initCreateForm($new_type),
   224         $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"object_added"), 
true);
   225         ilUtil::redirect(
"ilias.php?baseClass=ilMediaCastHandlerGUI&ref_id=" . $new_object->
getRefId() . 
"&cmd=editSettings");
   237         if ($a_presentation_mode) {
   238             $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
"mcst_view_abandoned"));
   242         if ($a_presentation_mode) {
   248         $med_items = $this->
object->getSortedItemsArray();
   250         if ($a_presentation_mode) {
   256         $table_gui->setData($med_items);
   258         if ($ilAccess->checkAccess(
"write", 
"", $this->requested_ref_id) && !$a_presentation_mode) {
   259             if (in_array($this->
object->getViewMode(), [
   264                 $ilToolbar->addButton(
$lng->
txt(
"add"), $this->
ctrl->getLinkTargetByClass(
"ilMediaCreationGUI", 
""));
   266                 $ilToolbar->addButton(
$lng->
txt(
"add"), $this->
ctrl->getLinkTarget($this, 
"addCastItem"));
   269             $table_gui->addMultiCommand(
"confirmDeletionItems", 
$lng->
txt(
"delete"));
   270             $table_gui->setSelectAllCheckbox(
"item_id");
   277     window.addEventListener(
'load', (
event) => {
   278         $(document).on(
'hidden.bs.modal', (e) => {
   279             $(
'.modal-body').
html(
'');
   281         $(document).on(
'shown.bs.modal', (e) => {
   282             window.dispatchEvent(
new Event(
'resize'));
   287         $tpl->
setContent($this->gui->ui()->renderer()->render($new_table->get()) . $script);
   293         $new_table->handleCommand();
   298         return $this->gui->getMediaCastManageTableGUI($this, 
"tableCommand");
   313             $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
   314             if ($enable_internal_rss) {
   336         $item_id = $this->mc_request->getItemId();
   337         $this->
ctrl->setParameterByClass(self::class, 
"item_id", $item_id);
   346             $this->mc_request->getItemId()
   350         $this->video_gui->addPreviewExtractionToToolbar(
   351             $this->mcst_item->getMobId(),
   362         foreach ($this->
object->getSortedItemsArray() as $item) {
   363             if ($mob_id == $item[
"mob_id"]) {
   364                 $this->
ctrl->setParameter($this, 
"item_id", $item[
"id"]);
   365                 $this->
ctrl->redirect($this, 
"editCastItem");
   368         $this->
ctrl->redirect($this, 
"listItems");
   373         foreach ($this->
object->getSortedItemsArray() as $item) {
   374             if ($mob_id == $item[
"mob_id"]) {
   377                 $mc_item->setTitle($mob->getTitle());
   378                 $mc_item->setContent($mob->getLongDescription());
   391         $ilTabs->activateTab(
"edit_content");
   396         $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
   399         $this->form_gui->setMultipart(
true);
   403         $text_input->setMaxLength(200);
   404         $this->form_gui->addItem($text_input);
   409         $this->form_gui->addItem($text_area);
   412         if ($enable_internal_rss) {
   415             $radio_group->addOption($radio_option);
   417             $radio_group->addOption($radio_option);
   419             $radio_group->setRequired(
true);
   420             $radio_group->setValue($this->
object->getDefaultAccess() == 0 ? 
"users" : 
"public");
   421             $this->form_gui->addItem($radio_group);
   428             $dur->setShowDays(
false);
   429             $dur->setShowHours(
true);
   430             $dur->setShowSeconds(
true);
   431             $this->form_gui->addItem($dur);
   435             if ($purpose == 
"VideoAlternative" &&
   436                 $a_mode == 
"create") {
   441             $section->setTitle(
$lng->
txt(
"mcst_" . strtolower($purpose) . 
"_title"));
   442             $this->form_gui->addItem($section);
   443             if ($a_mode != 
"create") {
   446                 $label->setPostVar(
"label_value_" . $purpose);
   447                 $label->setInfo(
$lng->
txt(
"mcst_current_value_info"));
   448                 $this->form_gui->addItem($label);
   449                 $this->form_gui->addItem($value);
   452             $file->
setSuffixes($this->mc_manager->getSuffixesForViewMode(
   453                 $this->object->getViewMode()
   455             $this->form_gui->addItem($file);
   458             $text_input->setInfo(
$lng->
txt(
"mcst_reference_info"));
   459             $this->form_gui->addItem($text_input);
   460             if ($purpose != 
"Standard") {
   462                 $clearCheckBox->setPostVar(
"delete_" . $purpose);
   463                 $clearCheckBox->setTitle(
$lng->
txt(
"mcst_clear_purpose_title"));
   464                 $this->form_gui->addItem($clearCheckBox);
   468                 $this->form_gui->addItem($ne);
   472                 if ($a_mode !== 
"create") {
   473                     $mcst_item = 
new ilNewsItem($this->mc_request->getItemId());
   476                 $this->video_gui->addPreviewInput($this->form_gui, $mob_id);
   481         if ($a_mode == 
"create") {
   482             $this->form_gui->setTitle(
$lng->
txt(
"mcst_add_new_item"));
   483             $this->form_gui->addCommandButton(
"saveCastItem", 
$lng->
txt(
"save"));
   485             $this->form_gui->setTitle(
$lng->
txt(
"mcst_edit_item"));
   486             $this->form_gui->addCommandButton(
"updateCastItem", 
$lng->
txt(
"save"));
   488         $this->form_gui->addCommandButton(
"listItems", 
$lng->
txt(
"cancel"));
   489         $this->form_gui->setFormAction($ilCtrl->getFormAction($this, 
"saveCastItem"));
   507             $this->mc_request->getItemId()
   509         if (count($mediaItems) > 0) {
   510             foreach ($mediaItems as $med) {
   511                 if (!isset($values[
"title"])) {
   513                     $values[
"title"] = $this->mcst_item->
getTitle();
   514                     $values[
"description"] = $this->mcst_item->getContent();
   515                     $values[
"visibility"] = $this->mcst_item->getVisibility();
   516                     $length = explode(
":", $this->mcst_item->getPlaytime());
   517                     $values[
"duration"] = array(
"hh" => $length[0], 
"mm" => $length[1], 
"ss" => $length[2]);
   520                 $values[
"value_" . $med->getPurpose()] = (strlen($med->getLocation()) > 100) ? 
"..." . substr($med->getLocation(), strlen($med->getLocation()) - 100) : $med->getLocation();
   521                 $values[
"label_value_" . $med->getPurpose()] = (strlen($med->getLocation()) > 100) ? 
"..." . substr($med->getLocation(), strlen($med->getLocation()) - 100) : $med->getLocation();
   522                 $values[
"mimetype_" . $med->getPurpose()] = $med->getFormat();
   526             if (!isset($values[
"value_" . $purpose])) {
   527                 $values[
"label_value_" . $purpose] = 
$lng->
txt(
"none");
   528                 $values[
"value_" . $purpose] = 
$lng->
txt(
"none");
   531         $this->form_gui->setValuesByArray($values);
   544         $ilTabs->activateTab(
"edit_content");
   548         if (!$this->form_gui->checkInput() ||
   549             ($this->form_gui->getInput(
"url_Standard") == 
"" && !$_FILES[
'file_Standard'][
'tmp_name'])) {
   550             $this->tpl->setOnScreenMessage(
'failure', 
$lng->
txt(
"mcst_input_either_file_or_url"));
   562             $title = $this->form_gui->getInput(
"title") != 
"" ? $this->form_gui->getInput(
"title") : basename($file);
   563             $description = $this->form_gui->getInput(
"description");
   564             $mob->setTitle($title);
   565             $mob->setDescription($description);
   568             $this->video_gui->savePreviewInput($this->form_gui, $mob->getId());
   574             foreach ($this->additionalPurposes as $purpose) {
   576                 $file_gui = $this->form_gui->getInput(
"file_" . $purpose);
   577                 $url_gui = $this->form_gui->getInput(
"url_" . $purpose);
   578                 if ($url_gui || $file_gui[
"size"] > 0) {
   585             if ($prevpic[
"size"] == 0) {
   588                 $mob->generatePreviewPic(320, 240);
   596             $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
   600             $mc_item->setMobId($mob->getId());
   602             $mc_item->setContextObjId($this->
object->getId());
   603             $mc_item->setContextObjType($this->
object->getType());
   604             $mc_item->setUserId($ilUser->getId());
   606             $mc_item->setTitle($title);
   607             $mc_item->setContent($description);
   608             $mc_item->setLimitation(
false);
   609             if ($enable_internal_rss) {
   610                 $mc_item->setVisibility($this->form_gui->getInput(
"visibility"));
   612                 $mc_item->setVisibility(
"users");
   616             $ilCtrl->redirect($this, 
"listItems");
   623             ? $this->form_gui->getInput(
"duration")
   624             : array(
"hh" => 0, 
"mm" => 0, 
"ss" => 0);
   626         $duration_str = str_pad(
$duration[
"hh"], 2, 
"0", STR_PAD_LEFT) . 
":" .
   627             str_pad(
$duration[
"mm"], 2, 
"0", STR_PAD_LEFT) . 
":" .
   628             str_pad(
$duration[
"ss"], 2, 
"0", STR_PAD_LEFT);
   634                 $duration_str = $this->
object->getPlaytimeForSeconds(
$d);
   638         return $duration_str;
   650         $mediaItem->setPurpose($purpose);
   670         $url_gui = $this->form_gui->getInput(
"url_" . $purpose);
   671         $file_gui = $this->form_gui->getInput(
"file_" . $purpose);
   674             $file = $this->form_gui->getInput(
"url_" . $purpose);
   675             $title = basename($file);
   676             $location = $this->form_gui->getInput(
"url_" . $purpose);
   677             $locationType = 
"Reference";
   678         } elseif ($file_gui[
"size"] > 0) {
   682             if (!is_dir($mob_dir)) {
   685                 $dir = LegacyPathHelper::createRelativePath($mob_dir);
   686                 $old_files = $this->
filesystem->finder()->in([$dir])->exclude([$dir . 
'/mob_vpreview.png'])->files();
   687                 foreach ($old_files as $file) {
   693             $file_name = str_replace(
" ", 
"_", $file_name);
   695             $file = $mob_dir . 
"/" . $file_name;
   697             $locationType = 
"LocalFile";
   709             if ($format === 
"") {
   718             $mediaItem->
setHeight(self::isAudio($format) ? 0 : 180);
   719             $mob->generatePreviewPic(320, 240);
   722         if (($purpose === 
"Standard") && isset($title)) {
   745         if ($this->form_gui->checkInput()) {
   748                 $this->mc_request->getItemId()
   757                 if ($this->form_gui->getInput(
"delete_" . $purpose)) {
   758                     $mob->removeMediaItem($purpose);
   759                     $ilLog->write(
"Mcst: deleting purpose $purpose");
   762                 $media_item = $mob->getMediaItem($purpose);
   763                 $url_gui = $this->form_gui->getInput(
"url_" . $purpose);
   764                 $file_gui = $this->form_gui->getInput(
"file_" . $purpose);
   766                 if ($media_item == null) {
   767                     if ($purpose != 
"Standard" &&
   768                        ($url_gui || $file_gui[
"size"] > 0)) {
   777                 if ($purpose == 
"Standard") {
   781                     $title = $this->form_gui->getInput(
"title") != 
"" ? $this->form_gui->getInput(
"title") : basename($file);
   782                     $description = $this->form_gui->getInput(
"description");
   784                     $mob->setTitle($title);
   785                     $mob->setDescription($description);
   787                     $this->video_gui->savePreviewInput($this->form_gui, $mob->getId());
   799             $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
   801             $mc_item->setUserId($ilUser->getId());
   805                 $seconds = ((
int) $dur_arr[0] * 60 * 60) + ((
int) $dur_arr[1] * 60) + ((
int) $dur_arr[2]);
   806                 $st_med = $mob->getMediaItem(
"Standard");
   807                 $st_med->setDuration($seconds);
   810             $mc_item->setTitle($title);
   811             $mc_item->setContent($description);
   812             if ($enable_internal_rss) {
   813                 $mc_item->setVisibility($this->form_gui->getInput(
"visibility"));
   817             $ilCtrl->redirect($this, 
"listItems");
   825         $f = $this->gui->ui()->factory();
   826         $item_id = $this->mc_request->getItemId();
   832             if ($med->getLocationType() === 
"Reference") {
   833                 $file = $med->getLocation();
   834                 if (in_array($med->getFormat(), [
"video/vimeo", 
"video/youtube"])) {
   835                     if (!is_int(strpos($file, 
"?"))) {
   836                         $file .= 
"?controls=0";
   838                         $file .= 
"&controls=0";
   846             if ($this->media_type->isAudio($med->getFormat())) {
   847                 $comp = 
$f->player()->audio($file, 
"");
   848             } elseif ($this->media_type->isVideo($med->getFormat())) {
   849                 $comp = 
$f->player()->video($file);
   850             } elseif ($this->media_type->isImage($med->getFormat())) {
   851                 $comp = 
$f->image()->responsive($file, $mob->getTitle());
   855         if (is_null($comp)) {
   856             $comp = 
$f->messageBox()->info($this->
lng->txt(
"mcst_item_not_found"));
   859             $this->
lng->txt(
"mcst_preview"),
   860             $this->
lng->txt(
"close")
   861         )->content([$comp])->send();
   867         $f = $this->gui->ui()->factory();
   868         $r = $this->gui->ui()->renderer();
   869         $ids = $this->mc_request->getItemIds();
   870         if (current($ids) === 
'ALL_OBJECTS') {
   871             $arr = $this->
object->getSortedItemsArray();
   872             $ids = array_keys($arr);
   875         foreach ($ids as 
$id) {
   877             $items[] = 
$f->modal()->interruptiveItem()->keyValue($id, 
"", $item->getTitle());
   879         $this->gui->send(
$r->renderAsync([
   880             $f->modal()->interruptive(
   881                 $this->
lng->txt(
"mcst_confirm_deletion"),
   882                 $this->
lng->txt(
"info_delete_sure"),
   883                 $this->
ctrl->getFormAction($this, 
"deleteItems")
   884             )->withAffectedItems($items)
   896         $ilTabs->activateTab(
"edit_content");
   898         $ids = $this->mc_request->getItemIds();
   899         if (count($ids) == 0) {
   907         $c_gui->setFormAction($ilCtrl->getFormAction($this, 
"deleteItems"));
   908         $c_gui->setHeaderText(
$lng->
txt(
"info_delete_sure"));
   909         $c_gui->setCancel(
$lng->
txt(
"cancel"), 
"listItems");
   910         $c_gui->setConfirm(
$lng->
txt(
"confirm"), 
"deleteItems");
   913         foreach ($ids as $item_id) {
   933         $ids = $this->mc_request->getItemIds();
   934         foreach ($ids as $item_id) {
   938         $this->
object->saveOrder(array_map(
function ($i) {
   940         }, $this->
object->readItems()));
   941         $ilCtrl->redirect($this, 
"listItems");
   953         $news_item = 
new ilNewsItem($this->mc_request->getItemId());
   954         $this->
object->handleLPUpdate($ilUser->getId(), $news_item->getMobId());
   955         if (!$news_item->deliverMobFile(
   957             $this->mc_request->getPresentation()
   959             $ilCtrl->redirect($this, 
"listItems");
   969         $mc_item = 
new ilNewsItem($this->mc_request->getItemId());
   973         $m_item = $mob->getMediaItem(
"Standard");
   977         $m_item->determineDuration();
   978         $dur = $m_item->getDuration();
   983             $this->tpl->setOnScreenMessage(
'success', 
$lng->
txt(
"mcst_set_playtime"), 
true);
   987             $this->tpl->setOnScreenMessage(
'failure', 
$lng->
txt(
"mcst_unable_to_determin_playtime"), 
true);
   990         $ilCtrl->redirect($this, 
"listItems");
  1001         $this->
ctrl->setCmd(
"showSummary");
  1002         $this->
ctrl->setCmdClass(
"ilinfoscreengui");
  1018         $info->enablePrivateNotes();
  1021         $this->
lng->loadLanguageModule(
"meta");
  1022         $this->
lng->loadLanguageModule(
"mcst");
  1023         $med_items = $this->
object->getItemsArray();
  1024         $info->addSection($this->
lng->txt(
"meta_general"));
  1026             $this->
lng->txt(
"mcst_nr_items"),
  1030         if (count($med_items) > 0) {
  1031             $cur = current($med_items);
  1037         $info->addProperty($this->
lng->txt(
"mcst_last_submission"), $last);
  1040         $this->
ctrl->forwardCommand($info);
  1053         if ($ilAccess->checkAccess(
'read', 
"", $this->object->getRefId())) {
  1057                 $this->
ctrl->getLinkTarget($this, 
"showContent")
  1062         if ($ilAccess->checkAccess(
'visible', 
"", $this->object->getRefId()) ||
  1063             $ilAccess->checkAccess(
'read', 
"", $this->object->getRefId())) {
  1067                 $this->
ctrl->getLinkTargetByClass(
"ilinfoscreengui", 
"showSummary")
  1072         if ($ilAccess->checkAccess(
'write', 
"", $this->object->getRefId())) {
  1076                 $this->
ctrl->getLinkTarget($this, 
"editSettings")
  1082                 'learning_progress',
  1083                 $lng->
txt(
'learning_progress'),
  1084                 $this->
ctrl->getLinkTargetByClass(array(__CLASS__, 
'illearningprogressgui'), 
'')
  1089         if ($ilAccess->checkAccess(
"write", 
"", $this->object->getRefId())) {
  1093                 $this->
ctrl->getLinkTargetByClass(
"ilexportgui", 
"")
  1098         if ($ilAccess->checkAccess(
'edit_permission', 
"", $this->object->getRefId())) {
  1102                 $this->
ctrl->getLinkTargetByClass(
"ilpermissiongui", 
"perm")
  1108         string $a_active = 
"content"  1117             $this->
ctrl->getLinkTarget($this, 
"showContent")
  1120         if ($ilAccess->checkAccess(
"write", 
"", $this->requested_ref_id)) {
  1124                 $this->
ctrl->getLinkTarget($this, 
"listItems")
  1131                     $this->
ctrl->getLinkTarget($this, 
"editOrder")
  1136         $ilTabs->activateSubTab($a_active);
  1137         $ilTabs->activateTab(
"content");
  1146         $ilTabs->activateTab(
"id_settings");
  1164         $this->form_gui->setTitle(
$lng->
txt(
"mcst_settings"));
  1168         $tit->setValue($this->
object->getTitle());
  1169         $tit->setRequired(
true);
  1170         $this->form_gui->addItem($tit);
  1175         $this->form_gui->addItem($des);
  1178         $sh->setTitle(
$lng->
txt(
"rep_activation_availability"));
  1179         $this->form_gui->addItem($sh);
  1183         $online->setChecked($this->
object->getOnline());
  1184         $this->form_gui->addItem($online);
  1188         $sh->setTitle(
$lng->
txt(
"obj_presentation"));
  1189         $this->form_gui->addItem($sh);
  1192         $obj_service->commonSettings()->legacyForm($this->form_gui, $this->
object)->addTileImage();
  1197             $lng->
txt(
"mcst_ordering_title"),
  1201             $lng->
txt(
"mcst_ordering_creation_date_asc"),
  1205             $lng->
txt(
"mcst_ordering_creation_date_desc"),
  1209             $lng->
txt(
"mcst_ordering_manual"),
  1212         $sort->setValue($this->
object->getOrder());
  1213         $this->form_gui->addItem($sort);
  1226             $lng->
txt(
"mcst_img_gallery"),
  1239         $si->setValue($this->
object->getViewMode());
  1240         $this->form_gui->addItem($si);
  1250         $si->setOptions($options);
  1251         $si->setValue($this->
object->getAutoplayMode());
  1252         $vc_opt->addSubItem($si);
  1256         $ti->setValue(max(1, $this->
object->getNumberInitialVideos()));
  1257         $ti->setMinValue(1);
  1259         $vc_opt->addSubItem($ti);
  1263         $downloadable->setChecked($this->
object->getDownloadable());
  1264         $downloadable->setInfo(
$lng->
txt(
"mcst_downloadable_info"));
  1265         $this->form_gui->addItem($downloadable);
  1268         $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
  1271         if ($enable_internal_rss) {
  1274             $sh->setTitle(
$lng->
txt(
"mcst_webfeed"));
  1275             $this->form_gui->addItem($sh);
  1279             $radio_option->
setInfo(
$lng->
txt(
"news_news_item_def_visibility_users_info"));
  1280             $radio_group->addOption($radio_option);
  1282             $radio_option->
setInfo(
$lng->
txt(
"news_news_item_def_visibility_public_info"));
  1283             $radio_group->addOption($radio_option);
  1284             $radio_group->setRequired(
false);
  1285             $radio_group->setValue($this->
object->getDefaultAccess());
  1286             #$ch->addSubItem($radio_group);  1287             $this->form_gui->addItem($radio_group);
  1292             $ch->setInfo(
$lng->
txt(
"news_public_feed_info"));
  1293             $ch->setChecked((
bool) $public_feed);
  1294             $this->form_gui->addItem($ch);
  1298             $ni->setMaxValue(100);
  1299             $ni->setMinValue(0);
  1300             $ni->setMaxLength(3);
  1302             $ni->setInfo($this->
lng->txt(
"news_keep_minimal_x_items_info") . 
" (" .
  1305             $ch->addSubItem($ni);
  1309             $incl_files->setChecked($this->
object->getPublicFiles());
  1310             $incl_files->setInfo(
$lng->
txt(
"mcst_incl_files_in_rss_info"));
  1311             #$ch->addSubItem($incl_files);  1312             $this->form_gui->addItem($incl_files);
  1317             $sh->setTitle(
$lng->
txt(
"learning_progress"));
  1318             $this->form_gui->addItem($sh);
  1322             $auto_lp->setChecked($this->
object->getNewItemsInLearningProgress());
  1323             $auto_lp->setInfo(
$lng->
txt(
"mcst_new_items_det_lp_info"));
  1324             $this->form_gui->addItem($auto_lp);
  1329         $feat->setTitle($this->
lng->txt(
'obj_features'));
  1330         $this->form_gui->addItem($feat);
  1332         if (!$this->
settings->get(
'disable_comments')) {
  1333             $this->
lng->loadLanguageModule(
"notes");
  1340         $this->form_gui->addCommandButton(
"saveSettings", 
$lng->
txt(
"save"));
  1341         $this->form_gui->setFormAction($ilCtrl->getFormAction($this, 
"saveSettings"));
  1351         $ilTabs->activateTab(
"id_settings");
  1354         if ($this->form_gui->checkInput()) {
  1356             $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
  1358             $this->
object->setTitle($this->form_gui->getInput(
"title"));
  1359             $this->
object->setDescription($this->form_gui->getInput(
"description"));
  1360             $this->
object->setOnline($this->form_gui->getInput(
"online"));
  1361             $this->
object->setDownloadable($this->form_gui->getInput(
"downloadable"));
  1362             $this->
object->setOrder($this->form_gui->getInput(
"order"));
  1363             $this->
object->setViewMode($this->form_gui->getInput(
"viewmode"));
  1364             $this->
object->setAutoplayMode((
int) $this->form_gui->getInput(
"autoplaymode"));
  1365             $this->
object->setNumberInitialVideos((
int) $this->form_gui->getInput(
"nr_videos"));
  1366             $this->
object->setNewItemsInLearningProgress((
int) $this->form_gui->getInput(
"auto_det_lp"));
  1368             if (!$this->
settings->get(
'disable_comments')) {
  1369                 $this->
object->setComments($this->form_gui->getInput(
"comments"));
  1373             $obj_service->commonSettings()->legacyForm($this->form_gui, $this->
object)->saveTileImage();
  1375             if ($enable_internal_rss) {
  1376                 $this->
object->setPublicFiles($this->form_gui->getInput(
"public_files"));
  1377                 $this->
object->setDefaultAccess($this->form_gui->getInput(
"defaultaccess"));
  1379             $this->
object->update();
  1381             if ($enable_internal_rss) {
  1385                     $this->form_gui->getInput(
"extra_feed"),
  1387                     $this->
object->getId()
  1393                     $this->form_gui->getInput(
"keep_rss_min"),
  1395                     $this->
object->getId()
  1399             $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_obj_modified"), 
true);
  1400             $ilCtrl->redirect($this, 
"editSettings");
  1402             $this->form_gui->setValuesByPost();
  1403             $this->tpl->setContent($this->form_gui->getHTML());
  1411         if (is_object($this->
object)) {
  1416     public static function _goto(
string $a_target): void
  1419         $main_tpl = $DIC->ui()->mainTemplate();
  1421         $ilAccess = $DIC->access();
  1422         $lng = $DIC->language();
  1423         $ctrl = $DIC->ctrl();
  1425         if ($ilAccess->checkAccess(
"read", 
"", $a_target)) {
  1428         } elseif ($ilAccess->checkAccess(
"visible", 
"", $a_target)) {
  1431             $main_tpl->setOnScreenMessage(
'failure', sprintf(
  1432                 $lng->
txt(
"msg_no_perm_read_item"),
  1441     protected static function isAudio(
string $extension): bool
  1443         return strpos($extension, 
"audio") !== 
false;
  1468         $this->form_gui->setValuesByPost();
  1475             if ($this->form_gui->getInput(
"value_" . $purpose)) {
  1476                 $input = $this->form_gui->getItemByPostVar(
"label_value_" . $purpose);
  1477                 $input->setValue($this->form_gui->getInput(
"value_" . $purpose));
  1481         $this->form_gui->setValuesByPost();
  1492         $ilTabs->activateTab(
"edit_content");
  1497         switch ($this->
object->getOrder()) {
  1511         $table_gui->setTitle(
$lng->
txt(
"mcst_media_cast"));
  1512         $table_gui->setData($this->
object->getSortedItemsArray());
  1514         $table_gui->addCommandButton(
"saveOrder", 
$lng->
txt(
"mcst_save_order"));
  1523         $ids = $this->mc_request->getItemIds();
  1527         foreach (array_keys($ids) as 
$id) {
  1530         $this->
object->saveOrder($items);
  1532         $this->tpl->setOnScreenMessage(
'success', 
$lng->
txt(
"settings_saved"), 
true);
  1533         $this->
ctrl->redirect($this, 
"editOrder");
  1549             $this->
object->getRefId(),
  1550             $this->
object->getId(),
  1560             $view = new \McstImageGalleryGUI($this->
object, $this->tpl, $this->
getFeedLink());
  1561             $view->setCompletedCallback($this->
ctrl->getLinkTarget(
  1563                 "handlePlayerCompletedEvent",
  1568             $this->
tabs->activateTab(
"content");
  1572             $view = new \McstPodcastGUI($this->
object, $this->tpl, $this->
getFeedLink());
  1573             $this->
tabs->activateTab(
"content");
  1577             $ilTabs->activateTab(
"content");
  1579             $view = new \ILIAS\MediaCast\Presentation\VideoViewGUI($this->
object, 
$tpl, $this->
getFeedLink());
  1580             $view->setCompletedCallback($this->
ctrl->getLinkTarget(
  1582                 "handlePlayerCompletedEvent",
  1587             $view->setAutoplayCallback($this->
ctrl->getLinkTarget(
  1589                 "handleAutoplayTrigger",
  1608         $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
"mcst_view_abandoned"));
  1615         $this->mcst_item = 
new ilNewsItem($this->mc_request->getItemId());
  1616         $this->video_gui->handleExtractionRequest(
  1617             $this->mcst_item->getMobId()
  1619         $ilCtrl->redirect($this, 
"editCastItem");
  1624         if ($this->mc_request->getEvent() === 
"play") {
  1625             $player = explode(
"_", $this->mc_request->getPlayer());
  1626             $news_id = (
int) $player[1];
  1628             $item->increasePlayCounter();
  1630             $mob_id = $item->getMobId();
  1633                 $this->
object->handleLPUpdate($ilUser->getId(), $mob_id);
  1641         $mob_id = $this->mc_request->getMobId();
  1644             $this->
object->handleLPUpdate($ilUser->getId(), $mob_id);
  1661         string $long_desc = 
"",
  1662         bool $redirect = 
true,
  1663         bool $extract = 
false  1669         foreach ($mob_ids as $mob_id) {
  1670             $item_ids[] = $this->
object->addMobToCast($mob_id, 
$user->
getId(), $long_desc, $extract);
  1674             if (count($item_ids) === 1) {
  1689         $this->
user->writePref(
  1691             $this->mc_request->getAutoplay()
  1698         return $this->gui->comments()->commentGUI(
  1699             $this->
object->getRefId(),
  1700             $this->mc_request->getItemId()
  1706         echo $this->
getCommentGUI()->getListHTML() . 
"<script>ilNotes.init(null);</script>";
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
redirectByClass( $a_class, string $a_cmd=null, string $a_anchor=null, bool $is_async=false)
 
initImportForm(string $new_type)
 
static _lookupRSSPeriod()
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
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...
 
redirect(object $a_gui_obj, string $a_cmd=null, string $a_anchor=null, bool $is_async=false)
 
GUI class for the workflow of copying objects. 
 
$location
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
prepareOutput(bool $show_sub_objects=true)
 
static getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory) 
 
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false)
 
setPlaytime(string $a_playtime)
 
static _gotoRepositoryNode(int $ref_id, string $cmd="")
 
setParameterByClass(string $a_class, string $a_parameter, $a_value)
 
loadLanguageModule(string $a_module)
Load language module. 
 
static checkAccess(int $a_ref_id, bool $a_allow_only_read=true)
check access to learning progress 
 
static _lookupObjId(int $ref_id)
 
static getASCIIFilename(string $a_filename)
 
setValue(string $a_value)
 
static renameExecutables(string $a_dir)
 
Export User Interface Class. 
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
ilGlobalTemplateInterface $tpl
 
static _lookup(string $a_type, string $a_setting, int $a_user=0, int $a_block_id=0)
Lookup setting from database. 
 
static _lookupTitle(int $obj_id)
 
setContent(string $a_html)
Sets content for standard template. 
 
setScreenIdComponent(string $a_comp)
 
Class ilObjectGUI Basic methods of all Output classes. 
 
static _recordReadEvent(string $a_type, int $a_ref_id, int $obj_id, int $usr_id, bool $isCatchupWriteEvents=true, $a_ext_rc=null, $a_ext_time=null)
 
static _write(string $a_type, string $a_setting, string $a_value, int $a_user=0, int $a_block_id=0)
Write setting to database. 
 
ilObjectService $object_service
 
static moveUploadedFile(string $a_file, string $a_name, string $a_target, bool $a_raise_errors=true, string $a_mode="move_uploaded")
move uploaded file 
 
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
static redirect(string $a_script)
 
setPermanentLink(string $a_type, ?int $a_id, string $a_append="", string $a_target="", string $a_title="")
Generates and sets a permanent ilias link. 
 
activateTab(string $a_id)
 
A news item can be created by different sources. 
 
initCreateForm(string $new_type)
 
const LP_CONTEXT_REPOSITORY
 
This class represents a text area property in a property form. 
 
addItem(string $a_title, string $a_link, string $a_frame="", int $a_ref_id=0, ?string $type=null)
 
static signFile(string $path_to_file)
 
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output. 
 
setParameter(object $a_gui_obj, string $a_parameter, $a_value)
 
addHeaderAction()
Add header action menu. 
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call 
 
static _gotoRepositoryRoot(bool $raise_error=false)
Goto repository root. 
 
static _updateStatus(int $a_obj_id, int $a_usr_id, ?object $a_obj=null, bool $a_percentage=false, bool $a_force_raise=false)