44 protected \ILIAS\MediaPool\InternalDomainService
$domain;
45 protected \ILIAS\COPage\Xsl\XslManager
$xsl;
62 int $a_id_type = self::REPOSITORY_NODE_ID,
63 int $a_parent_node_id = 0
67 $this->mep_request = $DIC->mediaPool()
71 $this->mep_item_id = $this->mep_request->getItemId();
75 $this->
tabs = $DIC->tabs();
76 $this->
locator = $DIC[
"ilLocator"];
77 $this->
help = $DIC[
"ilHelp"];
79 $this->main_tpl = $DIC->ui()->mainTemplate();
81 $this->
upload = $DIC->upload();
85 $this->db = $DIC->database();
87 $this->mode = ($this->mep_request->getMode() !==
"")
88 ? $this->mep_request->getMode()
90 $this->gui = $DIC->mediaPool()->internal()->gui();
91 $this->domain = $DIC->mediaPool()->internal()->domain();
92 $this->xsl = $DIC->copage()->internal()->domain()->xsl();
109 $tree = $this->
object->getTree();
115 if ($this->
ctrl->getCmd() ===
"explorer") {
116 $this->
ctrl->saveParameter($this, array(
"ref_id"));
118 $this->
ctrl->saveParameter($this, array(
"ref_id",
"mepitem_id"));
120 $this->
ctrl->saveParameter($this, array(
"mep_mode"));
145 $tree = $this->
object->getTree();
148 $next_class = $this->
ctrl->getNextClass($this);
149 $cmd = $this->
ctrl->getCmd();
150 $new_type = $this->mep_request->getNewType();
154 if ($new_type !==
"" && ($cmd !==
"confirmRemove" && $cmd !==
"copyToClipboard" 155 && $cmd !==
"pasteFromClipboard")) {
156 $this->tpl->setPermanentLink(
"mep", $this->ref_id);
160 if ($cmd ===
"create") {
161 switch ($this->mep_request->getNewType()) {
163 $this->
ctrl->redirectByClass(
"ilobjmediaobjectgui",
"create");
167 $this->
ctrl->redirectByClass(
"ilobjfoldergui",
"create");
172 switch ($next_class) {
173 case 'ilobjectmetadatagui':
179 $this->tabs_gui->activateTab(
'meta_data');
181 $this->
ctrl->forwardCommand($md_gui);
182 $this->tpl->printToStdout();
185 case strtolower(ilRepoStandardUploadHandlerGUI::class):
188 $gui = $form->getRepoStandardUploadHandlerGUI(
"media_files");
189 $this->
ctrl->forwardCommand($gui);
192 case 'ilmediapoolpagegui':
196 $ilTabs->clearTargets();
197 $ilCtrl->setReturn($this,
"returnFromItem");
200 $this->mep_request->getOldNr()
202 $mep_page_gui->setPoolGUI($this);
205 if (!$ilAccess->checkAccess(
"write",
"", $this->object->getRefId())) {
206 $mep_page_gui->setEnableEditing(
false);
208 $ret = $this->
ctrl->forwardCommand($mep_page_gui);
212 $this->tpl->printToStdout();
215 case "ilobjmediaobjectgui":
217 if ($cmd ===
"create" || $cmd ===
"save" || $cmd ===
"cancel") {
220 $ilObjMediaObjectGUI->setWidthPreset((
int) $this->getMediaPool()->getDefaultWidth());
221 $ilObjMediaObjectGUI->setHeightPreset((
int) $this->getMediaPool()->getDefaultHeight());
226 $ilTabs->setBackTarget(
228 $this->
ctrl->getLinkTarget(
234 if ($this->
ctrl->getCmdClass() ===
"ilinternallinkgui") {
235 $this->
ctrl->setReturn($this,
"explorer");
237 $this->
ctrl->setParameter($this,
"mepitem_id", $ret_obj);
238 $this->
ctrl->setReturn(
242 $this->
ctrl->setParameter($this,
"mepitem_id", $this->mep_item_id);
245 $ilObjMediaObjectGUI->setTabs();
249 $ilObjMediaObjectGUI->setAdvMdRecordObject($this->
object->getRefId(),
"mep",
"mob");
251 $ret = $this->
ctrl->forwardCommand($ilObjMediaObjectGUI);
252 if ($cmd ===
"save") {
253 $object = $ilObjMediaObjectGUI->getObject();
257 $mep_item->setType(
"mob");
264 "ilias.php?baseClass=ilMediaPoolPresentationGUI&cmd=listMedia&ref_id=" .
265 $this->requested_ref_id .
"&mepitem_id=" . $this->mep_item_id
269 $this->tpl->printToStdout();
272 case "ilmediacreationgui":
275 $this->
ctrl->setReturn($this,
"listMedia");
281 },
function ($mob_id, $long_desc) {
283 },
function ($mob_ids) {
285 },
function ($mob_id) {
287 },
function ($mob_id) {
290 $this->
ctrl->forwardCommand($creation);
291 $this->tpl->printToStdout();
295 case "ilobjfoldergui":
299 $this->
ctrl->setReturn($this,
"listMedia");
305 $folder_gui->setFormAction(
307 $this->
ctrl->getFormActionByClass(
"ilobjfoldergui")
309 $folder_gui->createObject();
310 $this->tpl->printToStdout();
315 $folder_gui->setFolderTree(
$tree);
316 $folder_gui->saveObject();
327 $this->
ctrl->setParameter($this,
"foldereditmode",
"1");
328 $folder_gui->setFormAction(
"update", $this->
ctrl->getFormActionByClass(
"ilobjfoldergui"));
329 $folder_gui->editObject();
330 $this->tpl->printToStdout();
341 $this->
ctrl->setReturn($this,
"listMedia");
342 $folder_gui->updateObject();
346 if ($this->mep_request->getFolderEditMode()) {
349 $this->
ctrl->redirect($this,
"listMedia");
354 case "ileditclipboardgui":
357 $this->
ctrl->setReturn($this, $this->mode);
359 $clip_gui->setMultipleSelections(
true);
360 $clip_gui->setInsertButtonTitle(
$lng->
txt(
"mep_copy_to_mep"));
361 $ilTabs->setTabActive(
"clipboard");
362 $this->
ctrl->forwardCommand($clip_gui);
363 $this->tpl->printToStdout();
366 case 'ilinfoscreengui':
370 $this->tpl->printToStdout();
373 case 'ilpermissiongui':
378 $ilTabs->activateTab(
"perm_settings");
379 $this->
ctrl->forwardCommand($perm_gui);
380 $this->tpl->printToStdout();
387 $ilTabs->activateTab(
"export");
389 $this->
ctrl->forwardCommand($exp_gui);
390 $this->tpl->printToStdout();
393 case "ilcommonactiondispatchergui":
395 $this->
ctrl->forwardCommand($gui);
398 case strtolower(TranslationGUI::class):
402 $ilTabs->activateTab(
"settings");
417 $transgui->forceContentTranslation();
418 $this->
ctrl->forwardCommand($transgui);
419 $this->tpl->printToStdout();
422 case "ilmediapoolimportgui":
426 $ilTabs->activateTab(
"import");
428 $this->
ctrl->forwardCommand($gui);
429 $this->tpl->printToStdout();
432 case "ilmobmultisrtuploadgui":
438 $this->
ctrl->forwardCommand($gui);
439 $this->tpl->printToStdout();
442 case strtolower(ilObjectMetaDataGUI::class):
446 $ilTabs->activateTab(
"meta_data");
448 $this->
ctrl->forwardCommand($gui);
451 case strtolower(SettingsGUI::class):
456 $ilTabs->activateTab(
"settings");
457 $gui = $this->gui->
settings()->settingsGUI(
460 $this->
ctrl->forwardCommand($gui);
461 $this->tpl->printToStdout();
467 $cmd = $this->
ctrl->getCmd(
"listMedia") ?:
"listMedia";
470 $this->tpl->printToStdout();
484 if (
$type !==
"fold") {
485 $tree = $this->
object->getTree();
497 $this->
ctrl->redirectByClass(
"ilobjmediaobjectgui",
"create");
503 $this->main_tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"object_added"),
true);
506 ilUtil::redirect(
"ilias.php?baseClass=ilMediaPoolPresentationGUI&ref_id=" . $new_object->
getRefId() .
"&cmd=listMedia");
511 $this->
ctrl->redirectByClass(SettingsGUI::class);
527 $ilCtrl->setParameter($this,
"mep_mode",
"listMedia");
531 $ilTabs->setTabActive(
"content");
534 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId())) {
535 $ilToolbar->addButton(
537 $ilCtrl->getLinkTargetByClass(
"ilMediaCreationGUI",
"")
541 if ($mset->get(
"mep_activate_pages")) {
542 $ilToolbar->addButton(
543 $lng->
txt(
"mep_create_content_snippet"),
544 $ilCtrl->getLinkTargetByClass([
"ilobjmediapoolgui",
"ilmediapoolpagegui"],
"createMediaPoolPage")
548 $ilToolbar->addButton(
549 $lng->
txt(
"mep_create_folder"),
550 $ilCtrl->getLinkTarget($this,
"createFolderForm")
553 $ilToolbar->addButton(
555 $ilCtrl->getLinkTarget($this,
"bulkUpload")
559 if (is_array($move_ids) && count($move_ids) > 0) {
560 $ilToolbar->addSeparator();
561 $ilToolbar->addButton(
563 $ilCtrl->getLinkTarget($this,
"paste")
568 $mep_table_gui =
new ilMediaPoolTableGUI($this,
"listMedia", $this->getMediaPool(),
"mepitem_id");
575 $exp->toggleExplorerNodeState();
588 $ilCtrl->setParameter($this,
"mep_mode",
"allMedia");
591 $ilTabs->setTabActive(
"content");
597 $this->getMediaPool(),
603 if ($this->mep_request->getForceFilter() > 0) {
604 $mep_table_gui->setTitleFilter(
612 $this->getMediaPool(),
630 $this->getMediaPool(),
635 $mtab->writeFilterToSession();
636 $mtab->resetOffset();
645 $this->getMediaPool(),
650 $mtab->resetFilter();
651 $mtab->resetOffset();
660 $this->tpl->loadStandardTemplate();
669 if ($this->mep_item_id == 0) {
672 $par_id = $this->
object->getPoolTree()->getParentId($this->mep_item_id);
673 if ($par_id != $this->
object->getPoolTree()->getRootId()) {
674 return (
int) $par_id;
690 $mob_id = $item->getForeignId();
692 $this->tpl =
new ilGlobalTemplate(
"tpl.fullscreen.html",
true,
true,
"components/ILIAS/COPage");
694 $this->tpl->setVariable(
695 "LOCATION_CONTENT_STYLESHEET",
704 $this->tpl->setVariable(
"TITLE",
" - " . $media_obj->getTitle());
715 $mode = ($this->
ctrl->getCmd() !==
"showPreview")
720 $this->
ctrl->getLinkTarget($this,
"showFullscreen",
"",
false,
false);
721 $params = array(
'mode' => $mode,
'enlarge_path' => $enlarge_path,
722 'link_params' =>
"ref_id=" . $this->requested_ref_id,
'fullscreen_link' => $fullscreen_link,
724 'ref_id' => $this->requested_ref_id,
'pg_frame' => $pg_frame,
'webspace_path' => $wb_path);
725 $output = $this->xsl->process($xml,
$params);
728 $this->tpl->setVariable(
"MEDIA_CONTENT", $output);
748 $page_gui->setTemplate(
$tpl);
750 $page_gui->setTemplateOutput(
false);
751 $page_gui->setHeader(
"");
752 $ret = $page_gui->showPage(
true);
770 $page_gui->setPoolGUI($this);
785 switch ($item->getType()) {
815 $ids = $this->mep_request->getItemIds();
816 if (count($ids) === 0) {
817 $this->main_tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_checkbox"),
true);
818 $ilCtrl->redirect($this,
"");
823 $cgui->setFormAction($this->
ctrl->getFormAction($this));
824 $cgui->setHeaderText($this->
lng->txt(
"info_remove_sure"));
825 $cgui->setCancel($this->
lng->txt(
"cancel"),
"cancelRemove");
826 $cgui->setConfirm($this->
lng->txt(
"confirm"),
"remove");
834 if (
$type ===
"pg") {
836 if (count($usages) > 0) {
837 $this->main_tpl->setOnScreenMessage(
'failure', sprintf(
$lng->
txt(
"mep_content_snippet_in_use"), $title),
true);
838 $ilCtrl->redirect($this,
"listMedia");
842 if (count($usages) > 0) {
843 $add =
"<div class='small'>" .
$lng->
txt(
"mep_content_snippet_used_in_older_versions") .
"</div>";
851 $cgui->addItem(
"id[]", $obj_id, $caption);
854 $this->tpl->setContent($cgui->getHTML());
866 $ilCtrl->setParameterByClass(
867 "ileditclipboardgui",
869 rawurlencode($ilCtrl->getLinkTarget(
871 "insertFromClipboard",
877 $ilCtrl->redirectByClass(
"ilEditClipboardGUI",
"getObject");
888 $this->domain->mediapool($this->
object->getId())
889 ->copySelectedFromEditClipboard($this->mep_item_id);
896 $this->
ctrl->redirect($this, $this->mode);
905 $this->
ctrl->redirect($this, $this->mode);
908 public function remove():
void 912 $ids = $this->mep_request->getItemIds();
914 $this->
object->deleteChild($obj_id);
917 $this->main_tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"cont_obj_removed"),
true);
918 $this->
ctrl->redirect($this, $this->mode);
931 $ids = $this->mep_request->getItemIds();
932 if (count($ids) === 0) {
933 $this->main_tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_checkbox"),
true);
934 $this->
ctrl->redirect($this, $this->mode);
939 if (
$type ===
"fold") {
940 $this->main_tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"cont_cant_copy_folders"),
true);
941 $this->
ctrl->redirect($this, $this->mode);
944 foreach ($ids as $obj_id) {
947 if (
$type ===
"mob") {
948 $ilUser->addObjectToClipboard($fid,
"mob",
"");
950 if (
$type ===
"pg") {
951 $ilUser->addObjectToClipboard($obj_id,
"incl",
"");
954 $this->main_tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"copied_to_clipboard"),
true);
955 $this->
ctrl->redirect($this, $this->mode);
966 $tree = $this->
object->getTree();
969 foreach (
$path as $node) {
971 $this->
ctrl->setParameter($this,
"mepitem_id",
"");
973 if ($ilAccess->checkAccess(
"read",
"", $this->object->getRefId())) {
974 $link = $this->
ctrl->getLinkTarget($this,
"listMedia");
975 } elseif ($ilAccess->checkAccess(
"visible",
"", $this->object->getRefId())) {
976 $link = $this->
ctrl->getLinkTarget($this,
"infoScreen");
978 $title = $this->
object->getTitle();
979 $this->
ctrl->setParameter($this,
"mepitem_id", $this->mep_item_id);
980 $ilLocator->addItem($title, $link,
"", $this->requested_ref_id);
1020 $this->
form->setValuesByArray($values);
1035 if ($this->
form->checkInput()) {
1037 $this->main_tpl->setOnScreenMessage(
'success',
$lng->
txt(
"mep_folder_created"),
true);
1039 $ilCtrl->redirect($this,
"listMedia");
1042 $this->
form->setValuesByPost();
1055 if ($this->
form->checkInput()) {
1057 $item->setTitle($this->
form->getInput(
"title"));
1059 $this->main_tpl->setOnScreenMessage(
'success',
$lng->
txt(
"msg_obj_modified"),
true);
1060 $ilCtrl->setParameter(
1063 $this->
object->getTree()->getParentId($this->mep_item_id)
1065 $ilCtrl->redirect($this,
"listMedia");
1068 $this->
form->setValuesByPost();
1085 $ti->setMaxLength(128);
1086 $ti->setRequired(
true);
1087 $this->
form->addItem($ti);
1090 if ($a_mode ===
"create") {
1091 $this->
form->addCommandButton(
"saveFolder",
$lng->
txt(
"save"));
1092 $this->
form->addCommandButton(
"cancelSave",
$lng->
txt(
"cancel"));
1093 $this->
form->setTitle(
$lng->
txt(
"mep_new_folder"));
1095 $this->
form->addCommandButton(
"updateFolder",
$lng->
txt(
"save"));
1096 $this->
form->addCommandButton(
"cancelFolderUpdate",
$lng->
txt(
"cancel"));
1097 $this->
form->setTitle(
$lng->
txt(
"mep_edit_folder"));
1100 $this->
form->setFormAction($ilCtrl->getFormAction($this));
1109 $this->
object->getTree()->getParentId($this->mep_item_id)
1111 $ilCtrl->redirect($this,
"listMedia");
1117 $ilCtrl->
redirect($this,
"listMedia");
1134 $ilTabs->addSubTab(
"content", $this->
lng->txt(
"objs_fold"), $this->
ctrl->getLinkTarget($this,
""));
1137 $ilTabs->addSubTab(
"mep_all_mobs", $this->
lng->txt(
"mep_all_mobs"), $this->
ctrl->getLinkTarget($this,
"allMedia"));
1138 $ilCtrl->setParameter($this,
"mepitem_id", $this->mep_item_id);
1140 if ($ilAccess->checkAccess(
'write',
'', $this->ref_id)) {
1143 $this->
lng->txt(
"mep_media_subtitles"),
1144 $ilCtrl->getLinkTargetByClass(
"ilmobmultisrtuploadgui",
"")
1148 $ilTabs->activateSubTab($a_active);
1159 if ($ilAccess->checkAccess(
'read',
'', $this->ref_id) ||
1160 $ilAccess->checkAccess(
'write',
'', $this->ref_id)) {
1161 $ilTabs->addTab(
"content", $this->
lng->txt(
"mep_content"), $this->
ctrl->getLinkTarget($this,
""));
1165 if ($ilAccess->checkAccess(
'visible',
'', $this->ref_id) ||
1166 $ilAccess->checkAccess(
'read',
'', $this->ref_id) ||
1167 $ilAccess->checkAccess(
'write',
'', $this->ref_id)) {
1170 $this->
lng->txt(
"info_short"),
1171 $this->
ctrl->getLinkTargetByClass(
1172 array(
"ilobjmediapoolgui",
"ilinfoscreengui"),
1178 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId())) {
1181 $this->
lng->txt(
"settings"),
1182 $this->
ctrl->getLinkTargetByClass(SettingsGUI::class)
1185 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId())) {
1188 $this->
lng->txt(
"clipboard"),
1189 $this->
ctrl->getLinkTarget($this,
"openClipboard")
1194 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId())) {
1197 $mdtab = $mdgui->getTab();
1201 $this->
lng->txt(
"meta_data"),
1207 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId())) {
1210 $this->
lng->txt(
"export"),
1211 $this->
ctrl->getLinkTargetByClass(
"ilexportgui",
"")
1216 $this->
lng->txt(
"import"),
1217 $this->
ctrl->getLinkTargetByClass(
"ilmediapoolimportgui",
"")
1221 if ($ilAccess->checkAccess(
"edit_permission",
"", $this->object->getRefId())) {
1224 $this->
lng->txt(
"perm_settings"),
1225 $this->
ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'),
"perm")
1237 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId())) {
1241 $this->
ctrl->getLinkTarget($this,
"edit")
1245 if ($mset->get(
"mep_activate_pages")) {
1246 $ilTabs->addSubTabTarget(
1247 "obj_multilinguality",
1248 $this->
ctrl->getLinkTargetByClass(TranslationGUI::class,
"")
1253 $ilTabs->setSubTabActive($a_active);
1257 public static function _goto(
string $a_target): void
1260 $main_tpl = $DIC->ui()->mainTemplate();
1262 $ilAccess = $DIC->access();
1263 $lng = $DIC->language();
1264 $ctrl = $DIC->ctrl();
1267 $targets = explode(
'_', $a_target);
1269 if (count((array) $targets) > 1) {
1270 $subitem_id = $targets[1];
1274 if ($ilAccess->checkAccess(
"read",
"",
$ref_id)) {
1277 } elseif ($ilAccess->checkAccess(
"visible",
"",
$ref_id)) {
1281 $lng->
txt(
"msg_no_perm_read_item"),
1295 $this->
ctrl->redirectByClass(ilInfoScreenGUI::class,
"showSummary");
1305 $this->
tabs->activateTab(
"info_short");
1308 if (!$ilAccess->checkAccess(
"visible",
"", $this->ref_id) &&
1309 !$ilAccess->checkAccess(
"read",
"", $this->ref_id) &&
1310 !$ilAccess->checkAccess(
"write",
"", $this->ref_id)) {
1314 if ($this->
ctrl->getCmd() ===
"infoScreen") {
1315 $this->
ctrl->redirectByClass(ilInfoScreenGUI::class,
"showSummary");
1320 $info->enablePrivateNotes();
1324 $info->addMetaDataSections($this->
object->getId(), 0, $this->
object->getType());
1339 ?array $a_files =
null 1349 $a_files = $this->mep_request->getFiles();
1352 $ilTabs->clearTargets();
1353 $ilTabs->setBackTarget(
1355 $ilCtrl->getLinkTarget($this,
"listMedia")
1364 "rename" =>
$lng->
txt(
"mep_up_dir_move"),
1365 "copy" =>
$lng->
txt(
"mep_up_dir_copy"),
1368 $si->setOptions($options);
1369 $tb->addInputItem($si);
1370 $tb->setCloseFormTag(
false);
1371 $tb->setFormAction($ilCtrl->getFormAction($this));
1372 $tb->setFormName(
"mep_up_form");
1376 "selectUploadDirFiles",
1379 $tab->setFormName(
"mep_up_form");
1388 int $a_mpool_ref_id,
1394 $ilCtrl = $DIC->ctrl();
1395 $lng = $DIC->language();
1396 $internal_gui = $DIC->mediaPool()
1400 ->standardRequest();
1406 $ilCtrl->setParameterByClass(
"ilobjmediapoolgui",
"mepitem_id",
"");
1407 $ilCtrl->setParameterByClass(
"ilobjmediapoolgui",
"ref_id", $a_mpool_ref_id);
1408 $tpl->addOnloadCode(
"il.MediaPool.setPreviewUrl('" . $ilCtrl->getLinkTargetByClass(array(
"ilmediapoolpresentationgui",
"ilobjmediapoolgui"),
"showPreview",
"",
false,
false) .
"');");
1409 $ilCtrl->setParameterByClass(
"ilobjmediapoolgui",
"mepitem_id",
$request->getItemId());
1410 $ilCtrl->setParameterByClass(
1411 "ilobjmediapoolgui",
1416 $modal = $internal_gui->ui()->factory()->modal()->roundtrip(
1418 $internal_gui->ui()->factory()->legacy()->content(
"<iframe id='ilMepPreviewContent'></iframe>")
1420 $html = $internal_gui->ui()->renderer()->render($modal);
1421 $html = str_replace(
1422 "<iframe id='ilMepPreviewContent'",
1423 "<iframe data-signal='" . $modal->getShowSignal()->getId() .
"' id='ilMepPreviewContent'",
1432 $ot = $this->
object->getObjectProperties()->getPropertyTranslations();
1434 if ($ot->getContentTranslationActivated()) {
1435 $format = explode(
"_", $this->mep_request->getExportFormat());
1439 $this->
object->exportXML($opt);
1458 if (is_null($this->bulk_upload_form)) {
1459 $mep_hash = uniqid();
1460 $this->
ctrl->setParameter($this,
"mep_hash", $mep_hash);
1461 $this->bulk_upload_form = $this->gui
1462 ->form(self::class,
'performBulkUpload')
1463 ->section(
"props", $this->
lng->txt(
'mep_bulk_upload'))
1466 $this->
lng->txt(
"mep_media_files"),
1467 \Closure::fromCallable([$this,
'handleUploadResult']),
1484 $mob->setTitle($title);
1485 $mob->setDescription(
"");
1488 $media_item = $mob->addMediaItemFromUpload(
1491 $this->mep_request->getUploadHash()
1515 $med_item = $mob->getMediaItem(
"Standard");
1516 $med_item->determineDuration();
1517 $med_item->update();
1521 $mep_item->setTitle($title);
1522 $mep_item->setType(
"mob");
1523 $mep_item->setForeignId($mob->getId());
1524 $mep_item->create();
1526 $tree = $this->
object->getTree();
1542 $item_ids[] = $mob->getId();
1556 HandlerResult::STATUS_OK,
1568 $this->
ctrl->setParameter($this,
"mep_hash", $this->mep_request->getUploadHash());
1569 $this->
ctrl->redirect($this,
"editTitlesAndDescriptions");
1583 $this->mep_request->getUploadHash()
1588 $tb->addFormButton(
$lng->
txt(
"save"),
"saveTitlesAndDescriptions");
1589 $tb->setOpenFormTag(
true);
1590 $tb->setCloseFormTag(
false);
1591 $tb->setId(
"tb_top");
1593 $html = $tb->getHTML();
1594 foreach ($media_items as $mi) {
1597 $acc->setId(
"acc_" . $mi[
"mob_id"]);
1601 $acc->addItem($mob->getTitle(), $form->
getHTML());
1603 $html .= $acc->getHTML();
1606 $html .= $tb->getHTML();
1607 $tb->setOpenFormTag(
false);
1608 $tb->setCloseFormTag(
true);
1609 $tb->setId(
"tb_bottom");
1629 $ti->setValue($a_title);
1646 $this->mep_request->getUploadHash()
1649 foreach ($media_items as $mi) {
1653 $title = $form->
getInput(
"title_" . $mi[
"mob_id"]);
1654 $desc = $form->
getInput(
"description_" . $mi[
"mob_id"]);
1655 if (trim($title) !==
"") {
1656 $mob->setTitle($title);
1658 $mob->setDescription($desc);
1661 $this->main_tpl->setOnScreenMessage(
'success',
$lng->
txt(
"msg_obj_modified"),
true);
1667 ilSession::set(
"mep_move_ids", $this->mep_request->getItemIds());
1668 $this->main_tpl->setOnScreenMessage(
'info', $this->
lng->txt(
"mep_move_select_insert"),
true);
1669 $this->
ctrl->redirect($this,
"listMedia");
1674 $target_folder_id = $this->mep_request->getItemId();
1675 $target_tree = $this->domain->tree($this->
object->getId());
1677 $target_folder_id = $target_tree->readRootId();
1681 $this->domain->mediapool($this->
object->getId())->pasteFromClipboard($target_folder_id);
1683 $this->main_tpl->setOnScreenMessage(
1685 $this->
lng->txt(
"mep_target_in_source_not_allowed") .
" " . $e->getMessage(),
1690 $this->
ctrl->redirect($this,
"listMedia");
1705 string $long_desc =
"",
1706 bool $redirect =
true,
1707 bool $extract =
false 1713 foreach ($mob_ids as $mob_id) {
1718 $mep_item->setType(
"mob");
1720 $mep_item->create();
1723 $tree = $this->
object->getTree();
1740 $this->
ctrl->redirect($this,
"listMedia");
setOnScreenMessage(string $type, string $a_txt, bool $a_keep=false)
Set a message to be displayed to the user.
static getWebspaceDir(string $mode="filesystem")
get webspace directory
static get(string $a_var)
static getStyleSheetLocation(string $mode="output", string $a_css_name="")
get full style sheet file name (path inclusive) of current user
getFormAction(object $a_gui_obj, ?string $a_fallback_cmd=null, ?string $a_anchor=null, bool $is_async=false, bool $has_xml_style=false)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getLogger(string $a_component_id)
Get component logger.
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...
New implementation of ilObjectGUI.
special template class to simplify handling of ITX/PEAR
if(! $DIC->user() ->getId()||!ilLTIConsumerAccess::hasCustomProviderCreationAccess()) $params
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
GUI class for object translation handling.
setContent(string $a_html)
Sets content for standard template.
setParameterByClass(string $a_class, string $a_parameter, $a_value)
prepareOutput(bool $show_sub_objects=true)
loadLanguageModule(string $a_module)
Load language module.
setVariable(string $variable, $value='')
Sets the given variable to the given value.
redirectByClass( $a_class, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false)
getPathFull(int $a_endnode_id, int $a_startnode_id=0)
get path from a given startnode to a given endnode if startnode is not given the rootnode is startnod...
static _lookupObjId(int $ref_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
setAdvMdRecordObject(int $a_adv_ref_id, string $a_adv_type, string $a_adv_subtype="-")
Set object, that defines the adv md records being used.
static http()
Fetches the global http state from ILIAS.
static getUsages(string $a_pc_type, int $a_pc_id, bool $a_incl_hist=true)
Get usages.
static _lookupTitle(int $obj_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
redirect(object $a_gui_obj, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false)
setCreationMode(bool $mode=true)
ServerRequestInterface $request
setScreenIdComponent(string $a_comp)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilGlobalTemplateInterface $tpl
static getImagePath(string $image_name, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
Class BasicHandlerResult.
getParentId(int $a_node_id)
get parent id of given node
static getSyntaxStylePath()
printToStdout(string $part=self::DEFAULT_BLOCK, bool $has_tabs=true, bool $skip_main_menu=false)
static getContentStylePath(int $a_style_id, bool $add_random=true, bool $add_token=true)
get content style path static (to avoid full reading)
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
static redirect(string $a_script)
form( $class_path, string $cmd, string $submit_caption="")
insertNode(int $a_node_id, int $a_parent_id, int $a_pos=self::POS_LAST_NODE, bool $a_reset_deletion_date=false)
insert new node with node_id under parent node with parent_id
addCss(string $a_css_file, string $media="screen")
Add a css file that should be included in the header.
__construct(Container $dic, ilPlugin $plugin)
addJavaScript(string $a_js_file, bool $a_add_version_parameter=true, int $a_batch=2)
Add a javascript file that should be included in the header.
This class represents a text area property in a property form.
saveParameter(object $a_gui_obj, $a_parameter)
setParameter(object $a_gui_obj, string $a_parameter, $a_value)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
addHeaderAction()
Add header action menu.
Class ilMediaPoolPage GUI class.
static set(string $a_var, $a_val)
Set a value.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
static _gotoRepositoryRoot(bool $raise_error=false)
Goto repository root.