29 protected \ILIAS\DI\UIServices
$ui;
30 protected \ilLanguage
$lng;
39 $this->
ui = $DIC->ui();
40 $this->
lng = $DIC->language();
42 $this->
user = $DIC->user();
49 switch ($body[
"action"]) {
54 return $this->modifyTableCommand($body);
57 throw new Exception(
"Unknown action " . $body[
"action"]);
64 if ($body[
"data"][
"redirect"]) {
65 return $this->ui_wrapper->sendPage($this->page_gui,
$updated);
95 $data = new \stdClass();
115 $page = $this->page_gui->getPageObject();
116 $table = $page->getContentObjectForPcId($pcid);
120 foreach ($content as
$i => $row) {
121 if (is_array($row)) {
122 foreach ($row as $j => $cell) {
123 $text =
"<div>" . $cell .
"</div>";
129 $text = $text[
"text"];
135 $table->getLanguage(),
148 $table->setData(
$data);
158 $page = $this->page_gui->getPageObject();
162 $table = $page->getContentObjectForPcId($body[
"data"][
"tablePcid"]);
165 if ($table->getType() ==
"dtab") {
166 $this->
updateData($body[
"data"][
"tablePcid"], $body[
"data"][
"content"]);
173 $td = $page->getContentObjectForPcId($body[
"data"][
"cellPcid"]);
175 switch ($body[
"data"][
"modification"]) {
210 return $this->
sendTable($this->page_gui, $body[
"data"][
"tablePcid"]);
222 $table = $page->getContentObjectForPcId($pcid);
223 if ($table->getType() ==
"dtab") {
224 $table_gui = new \ilPCDataTableGUI(
227 $page->getHierIdForPcId($pcid),
231 $table_gui = new \ilPCTableGUI(
234 $page->getHierIdForPcId($pcid),
239 $data = new \stdClass();
240 $data->renderedContent = $table_gui->getEditDataTable();
static handleAjaxContent(string $a_content)
Handle ajax content.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Command action handler interface.
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false)
Server UIWrapper $ui_wrapper
static handleAjaxContentPost(string $text)
Post input2xml handling of ajax content.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(\ilPageObjectGUI $page_gui)
static _input2xml(string $a_text, string $a_lang, bool $a_wysiwyg=false, bool $a_handle_lists=true)
Converts user input to xml User input comes as bb code information, e.g.
sendUpdateResponse(\ilPageObjectGUI $page_gui, $updated, string $pcid)
updateDataCommand(array $body)
ilPageObjectGUI $page_gui
handle(array $query, array $body)
sendTable(\ilPageObjectGUI $page_gui, string $pcid)
Send whole table as response.
updateData(string $pcid, array $content)
static setUseRelativeDates(bool $a_status)
set use relative dates