44 $this->
ui = $DIC->ui();
45 $this->lng = $DIC->language();
47 $this->
user = $DIC->user();
59 switch ($body[
"action"]) {
69 throw new Exception(
"Unknown action " . $body[
"action"]);
81 $page = $this->page_gui->getPageObject();
85 if (!in_array($body[
"after_pcid"], [
"",
"pg"])) {
86 $hier_ids = $page->getHierIdsForPCIds([$body[
"after_pcid"]]);
87 $hier_id = $hier_ids[$body[
"after_pcid"]];
88 $pc_id = $body[
"after_pcid"];
93 $pc_media = new \ilPCMediaObject($page);
94 $pc_media->createMediaObject();
95 $mob = $pc_media->getMediaObject();
97 $pc_media->createAlias($page, $hier_id, $pc_id);
98 $updated = $page->update();
100 return $this->ui_wrapper->sendPage($this->page_gui, $updated);
110 $page = $this->page_gui->getPageObject();
111 $pc_media = $page->getContentObjectForPcId($body[
"pcid"]);
113 $quick_edit = new \ilPCMediaObjectQuickEdit($pc_media);
119 $quick_edit->setUseFullscreen((
bool) ($body[
"fullscreen"]));
123 $pc_media->getMediaObject()->update();
124 $updated = $page->update();
126 return $this->ui_wrapper->sendPage($this->page_gui, $updated);
Command action handler interface.
updateCommand($body)
Update command.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
__construct(\ilPageObjectGUI $page_gui)
insertCommand($body)
Insert command.