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"];
92 $sec = new \ilPCSection($page);
93 $sec->create($page, $hier_id, $pc_id);
94 $sec_gui = new \ilPCSectionGUI($page, $sec,
"",
"");
95 $sec_gui->setPageConfig($page->getPageConfig());
97 $form = $sec_gui->initForm(
true);
101 if ($form->checkInput()) {
102 $sec_gui->setValuesFromForm($form);
103 $updated = $page->update();
106 return $this->ui_wrapper->sendPage($this->page_gui, $updated);
116 $page = $this->page_gui->getPageObject();
118 $hier_id = $page->getHierIdForPcId($body[
"pcid"]);
119 $sec = $page->getContentObjectForPcId($body[
"pcid"]);
120 $sec_gui = new \ilPCSectionGUI($page, $sec, $hier_id, $body[
"pcid"]);
121 $sec_gui->setPageConfig($page->getPageConfig());
123 $form = $sec_gui->initForm(
false);
127 if ($form->checkInput()) {
128 $sec_gui->setValuesFromForm($form);
129 $updated = $page->update();
132 return $this->ui_wrapper->sendPage($this->page_gui, $updated);
updateCommand($body)
Update command.
insertCommand($body)
All command.
Command action handler interface.
__construct(\ilPageObjectGUI $page_gui)