30 protected \ILIAS\MediaPool\Clipboard\ClipboardGUIRequest
$request;
49 $this->
lng = $DIC->language();
50 $this->
ctrl = $DIC->ctrl();
51 $this->
user = $DIC->user();
52 $this->
tabs = $DIC->tabs();
53 $this->tree = $DIC->repositoryTree();
54 $this->tpl = $DIC[
"tpl"];
55 $this->
toolbar = $DIC->toolbar();
56 $lng = $DIC->language();
57 $ilCtrl = $DIC->ctrl();
59 $this->request = $DIC->mediaPool()
66 $this->page_back_title = $lng->
txt(
"cont_back");
67 $this->requested_return_cmd = $this->request->getReturnCmd();
68 $this->requested_clip_item_id = $this->request->getItemId();
69 $this->requested_pcid = $this->request->getPCId();
70 $this->clipboard_manager = $DIC->mediaPool()
75 if ($this->requested_return_cmd !==
"") {
76 $this->mode =
"getObject";
81 $ilCtrl->setParameter(
84 rawurlencode($this->requested_return_cmd)
87 $ilCtrl->saveParameter($this, array(
"clip_item_id",
"pcid"));
97 $next_class = $ilCtrl->getNextClass($this);
98 $cmd = $ilCtrl->getCmd();
99 switch ($next_class) {
100 case "ilobjmediaobjectgui":
101 $ilCtrl->setReturn($this,
"view");
102 $ilTabs->clearTargets();
103 $ilTabs->setBackTarget(
105 $ilCtrl->getLinkTarget($this,
"view")
109 $ilCtrl->forwardCommand($mob_gui);
113 $mob_gui->getObject()->getId(),
115 $mob_gui->getObject()->getTitle()
117 $ilCtrl->redirect($this,
"view");
140 $this->insertbuttontitle = $a_insertbuttontitle;
147 if ($this->insertbuttontitle ===
"") {
148 return $lng->
txt(
"insert");
161 $but->setUrl($ilCtrl->getLinkTargetByClass(
"ilobjmediaobjectgui",
"create"));
162 $but->setCaption(
"cont_create_mob");
163 $ilToolbar->addButtonInstance($but);
172 $this->mode =
"getObject";
180 public function remove():
void 187 $ids = $this->request->getItemIds();
189 if (count($ids) === 0) {
190 $this->tpl->setOnScreenMessage(
'failure', $lng->
txt(
"no_checkbox"),
true);
194 foreach ($ids as $obj_id) {
195 $id = explode(
":", $obj_id);
196 if (
$id[0] ===
"mob") {
197 $ilUser->removeObjectFromClipboard(
$id[1],
"mob");
198 include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
202 if (
$id[0] ===
"incl") {
203 $ilUser->removeObjectFromClipboard(
$id[1],
"incl");
206 $ilCtrl->redirect($this,
"view");
214 if ($this->requested_pcid !==
"") {
218 $ids = $this->request->getItemIds();
221 if (count($ids) === 0) {
222 $this->tpl->setOnScreenMessage(
'failure', $lng->
txt(
"no_checkbox"),
true);
227 $this->tpl->setOnScreenMessage(
'failure', $lng->
txt(
"cont_select_max_one_item"),
true);
231 $this->clipboard_manager->setIds($ids);
238 $clipboard_manager = $DIC->mediaPool()
243 return $clipboard_manager->getIds();
258 $this->page_back_title = $a_title;
266 $tabs_gui->setBackTarget(
267 $this->page_back_title,
268 $ilCtrl->getParentReturn($this)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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)
setInsertButtonTitle(string $a_insertbuttontitle)
string $requested_return_cmd
setMultipleSelections(bool $a_multiple=true)
setContent(string $a_html)
Sets content for standard template.
ILIAS MediaPool Clipboard ClipboardGUIRequest $request
string $insertbuttontitle
int $requested_clip_item_id
ilGlobalTemplateInterface $tpl
setTitle(string $a_title, bool $hidden=false)
Sets title in standard template.
setPageBackTitle(string $a_title)
static redirect(string $a_script)
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
ILIAS MediaPool Clipboard ClipboardManager $clipboard_manager