5 require_once(
"./Services/MediaObjects/classes/class.ilObjMediaObjectGUI.php");
28 $this->multiple =
false;
29 $this->page_back_title = $lng->txt(
"cont_back");
30 if (
$_GET[
"returnCommand"] !=
"")
32 $this->mode =
"getObject";
39 $ilCtrl->setParameter($this,
"returnCommand",
40 rawurlencode(
$_GET[
"returnCommand"]));
42 $ilCtrl->saveParameter($this, array(
"clip_item_id"));
52 return array(
"ilObjMediaObjectGUI");
62 $next_class = $ilCtrl->getNextClass($this);
63 $cmd = $ilCtrl->getCmd();
67 case "ilobjmediaobjectgui":
68 $ilCtrl->setReturn($this,
"view");
69 $ilTabs->clearTargets();
70 $ilTabs->setBackTarget($lng->txt(
"back"),
71 $ilCtrl->getLinkTarget($this,
"view"));
72 require_once(
"classes/class.ilTabsGUI.php");
76 $ret =& $ilCtrl->forwardCommand($mob_gui);
80 $ilUser->addObjectToClipboard(
$ret->getId(),
"mob",
$ret->getTitle());
81 $ilCtrl->redirect($this,
"view");
99 $this->multiple = $a_multiple;
107 return $this->multiple;
117 $this->insertbuttontitle = $a_insertbuttontitle;
129 if ($this->insertbuttontitle ==
"")
131 return $lng->txt(
"insert");
134 return $this->insertbuttontitle;
144 $tpl->addBlockfile(
"BUTTONS",
"buttons",
"tpl.buttons.html");
146 $tpl->setCurrentBlock(
"btn_cell");
147 $tpl->setVariable(
"BTN_LINK",
148 $ilCtrl->getLinkTargetByClass(
"ilobjmediaobjectgui",
"create"));
149 $tpl->setVariable(
"BTN_TXT", $lng->txt(
"cont_create_mob"));
150 $tpl->parseCurrentBlock();
152 include_once(
"./Services/Clipboard/classes/class.ilClipboardTableGUI.php");
154 $tpl->setContent($table_gui->getHTML());
163 $this->mode =
"getObject";
178 $ilias->raiseError($lng->txt(
"no_checkbox"),$ilias->error_obj->MESSAGE);
181 foreach(
$_POST[
"id"] AS $obj_id)
183 $id = explode(
":", $obj_id);
186 $ilUser->removeObjectFromClipboard($id[1],
"mob");
187 include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
191 if ($id[0] ==
"incl")
193 $ilUser->removeObjectFromClipboard($id[1],
"incl");
196 $ilCtrl->redirect($this,
"view");
209 $ilias->raiseError($lng->txt(
"no_checkbox"),$ilias->error_obj->MESSAGE);
214 if(count(
$_POST[
"id"]) > 1)
216 $ilias->raiseError($lng->txt(
"cont_select_max_one_item"),$ilias->error_obj->MESSAGE);
226 return $_SESSION[
"ilEditClipboard_mob_id"];
237 $tpl->setTitle($lng->txt(
"clipboard"));
246 $this->page_back_title = $a_title;
259 $tabs_gui->setBackTarget($this->page_back_title,
260 $ilCtrl->getParentReturn($this));