30 protected \ILIAS\MediaPool\Clipboard\ClipboardGUIRequest
$request;
46 string $return_cmd =
""
51 $this->
lng = $DIC->language();
52 $this->
ctrl = $DIC->ctrl();
53 $this->
user = $DIC->user();
54 $this->
tabs = $DIC->tabs();
55 $this->tree =
$DIC->repositoryTree();
56 $this->tpl =
$DIC[
"tpl"];
57 $this->
toolbar = $DIC->toolbar();
59 $ilCtrl =
$DIC->ctrl();
61 $this->request =
$DIC->mediaPool()
68 $this->page_back_title =
$lng->
txt(
"cont_back");
69 $this->requested_return_cmd = $return_cmd;
70 $this->requested_clip_item_id = $this->request->getItemId();
71 $this->requested_pcid = $this->request->getPCId();
72 $this->clipboard_manager =
$DIC->mediaPool()
77 if ($this->requested_return_cmd !==
"") {
78 $this->mode =
"getObject";
83 $ilCtrl->saveParameter($this, array(
"clip_item_id",
"pcid"));
93 $next_class = $ilCtrl->getNextClass($this);
94 $cmd = $ilCtrl->getCmd();
95 switch ($next_class) {
96 case "ilobjmediaobjectgui":
97 $ilCtrl->setReturn($this,
"view");
98 $ilTabs->clearTargets();
99 $ilTabs->setBackTarget(
101 $ilCtrl->getLinkTarget($this,
"view")
105 $ilCtrl->forwardCommand($mob_gui);
109 $mob_gui->getObject()->getId(),
111 $mob_gui->getObject()->getTitle()
113 $ilCtrl->redirect($this,
"view");
136 $this->insertbuttontitle = $a_insertbuttontitle;
143 if ($this->insertbuttontitle ===
"") {
157 $but->setUrl($ilCtrl->getLinkTargetByClass(
"ilobjmediaobjectgui",
"create"));
158 $but->setCaption(
"cont_create_mob");
159 $ilToolbar->addButtonInstance($but);
168 $this->mode =
"getObject";
176 public function remove():
void
183 $ids = $this->request->getItemIds();
185 if (count($ids) === 0) {
186 $this->tpl->setOnScreenMessage(
'failure',
$lng->
txt(
"no_checkbox"),
true);
190 foreach ($ids as $obj_id) {
191 $id = explode(
":", $obj_id);
192 if (
$id[0] ===
"mob") {
193 $ilUser->removeObjectFromClipboard(
$id[1],
"mob");
194 include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
198 if (
$id[0] ===
"incl") {
199 $ilUser->removeObjectFromClipboard(
$id[1],
"incl");
202 $ilCtrl->redirect($this,
"view");
210 if ($this->requested_pcid !==
"") {
214 $ids = $this->request->getItemIds();
217 if (count($ids) === 0) {
218 $this->tpl->setOnScreenMessage(
'failure',
$lng->
txt(
"no_checkbox"),
true);
223 $this->tpl->setOnScreenMessage(
'failure',
$lng->
txt(
"cont_select_max_one_item"),
true);
227 $this->clipboard_manager->setIds($ids);
254 $this->page_back_title = $a_title;
262 $tabs_gui->setBackTarget(
263 $this->page_back_title,
264 $ilCtrl->getParentReturn($this)
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ilCtrl provides processing control methods.
redirect(object $a_gui_obj, string $a_cmd=null, string $a_anchor=null, bool $is_async=false)
@inheritDoc
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
string $insertbuttontitle
ilGlobalTemplateInterface $tpl
ILIAS MediaPool Clipboard ClipboardGUIRequest $request
string $requested_return_cmd
ILIAS MediaPool Clipboard ClipboardManager $clipboard_manager
__construct(string $return_cmd="")
setInsertButtonTitle(string $a_insertbuttontitle)
int $requested_clip_item_id
setPageBackTitle(string $a_title)
setMultipleSelections(bool $a_multiple=true)
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...
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...
static redirect(string $a_script)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setContent(string $a_html)
Sets content for standard template.
setTitle(string $a_title, bool $hidden=false)
Sets title in standard template.