ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
class.ilPCDataTableGUI.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4require_once("./Services/COPage/classes/class.ilPCDataTable.php");
5require_once("./Services/COPage/classes/class.ilPCTableGUI.php");
6require_once("./Services/COPage/classes/class.ilPageContentGUI.php");
7
19{
23 protected $tabs;
24
25
29 protected $main_tpl;
30
34 protected $tool_context;
35
40 public function __construct(&$a_pg_obj, &$a_content_obj, $a_hier_id, $a_pc_id = "")
41 {
42 global $DIC;
43
44 $this->main_tpl = $DIC->ui()->mainTemplate();
45 $this->lng = $DIC->language();
46 $this->ctrl = $DIC->ctrl();
47 $this->tabs = $DIC->tabs();
48 parent::__construct($a_pg_obj, $a_content_obj, $a_hier_id, $a_pc_id);
49 $this->setCharacteristics(array("StandardTable" => $this->lng->txt("cont_StandardTable")));
50 $this->tool_context = $DIC->globalScreen()->tool()->context();
51 }
52
56 public function executeCommand()
57 {
58 $this->getCharacteristicsOfCurrentStyle("table"); // scorm-2004
59
60 // get next class that processes or forwards current command
61 $next_class = $this->ctrl->getNextClass($this);
62
63 // get current command
64 $cmd = $this->ctrl->getCmd();
65
66 switch ($next_class) {
67 default:
68 $ret = $this->$cmd();
69 break;
70 }
71
72 return $ret;
73 }
74
75
79
83 public function editDataCl()
84 {
87 //var_dump($_GET);
88 //var_dump($_POST);
89
90 $this->setTabs();
91
93
94 include_once("./Services/COPage/classes/class.ilPCParagraph.php");
95
96 $this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.tabledata.html", "Services/COPage");
97 $dtpl = $this->tpl;
98 //$dtpl = new ilTemplate("tpl.tabledata.html", true, true, "Services/COPage");
99 $dtpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this, "tableAction"));
100 $dtpl->setVariable("BB_MENU", $this->getBBMenu("cell_0_0"));
101
105 $this->tpl->addJavascript("./Services/COPage/phpBB/3_0_5/editor.js");
106 $this->tpl->addJavascript("./Services/COPage/js/page_editing.js");
107 $this->tpl->addJavascript("./Services/COPage/js/paragraph_editing.js");
108
109 // get all rows
110 $xpc = xpath_new_context($this->dom);
111 $path = "//PageContent[@HierId='" . $this->getHierId() . "']" .
112 "/Table/TableRow";
113 $res = xpath_eval($xpc, $path);
114
115 for ($i = 0; $i < count($res->nodeset); $i++) {
116 $xpc2 = xpath_new_context($this->dom);
117 $path2 = "//PageContent[@HierId='" . $this->getHierId() . "']" .
118 "/Table/TableRow[$i+1]/TableData";
119 $res2 = xpath_eval($xpc2, $path2);
120
121 // if this is the first row -> col icons
122 if ($i == 0) {
123 for ($j = 0; $j < count($res2->nodeset); $j++) {
124 if ($j == 0) {
125 $dtpl->touchBlock("empty_td");
126 }
127
128 if ($j == 0) {
129 if (count($res2->nodeset) == 1) {
130 $move_type = "none";
131 } else {
132 $move_type = "forward";
133 }
134 } elseif ($j == (count($res2->nodeset) - 1)) {
135 $move_type = "backward";
136 } else {
137 $move_type = "both";
138 }
139 $dtpl->setCurrentBlock("col_icon");
140 $dtpl->setVariable("COL_ICON_ALT", $lng->txt("content_column"));
141 $dtpl->setVariable("COL_ICON", ilUtil::getImagePath("col.svg"));
142 $dtpl->setVariable("COL_ONCLICK", "COL_" . $move_type);
143 $dtpl->setVariable("NR", $j);
144 $dtpl->parseCurrentBlock();
145 }
146 $dtpl->setCurrentBlock("row");
147 $dtpl->parseCurrentBlock();
148 }
149
150
151 for ($j = 0; $j < count($res2->nodeset); $j++) {
152 // first col: row icons
153 if ($j == 0) {
154 if ($i == 0) {
155 if (count($res->nodeset) == 1) {
156 $move_type = "none";
157 } else {
158 $move_type = "forward";
159 }
160 } elseif ($i == (count($res->nodeset) - 1)) {
161 $move_type = "backward";
162 } else {
163 $move_type = "both";
164 }
165 $dtpl->setCurrentBlock("row_icon");
166 $dtpl->setVariable("ROW_ICON_ALT", $lng->txt("content_row"));
167 $dtpl->setVariable("ROW_ICON", ilUtil::getImagePath("row.svg"));
168 $dtpl->setVariable("ROW_ONCLICK", "ROW_" . $move_type);
169 $dtpl->setVariable("NR", $i);
170 $dtpl->parseCurrentBlock();
171 }
172
173 // cell
174 if ($res2->nodeset[$j]->get_attribute("Hidden") != "Y") {
175 $dtpl->setCurrentBlock("cell");
176
177 if (is_array($_POST["cmd"]) && key($_POST["cmd"]) == "update") {
178 $s_text = ilUtil::stripSlashes("cell_" . $i . "_" . $j, false);
179 } else {
180 $s_text = ilPCParagraph::xml2output($this->content_obj->getCellText($i, $j));
181 }
182
183 $dtpl->setVariable("PAR_TA_NAME", "cell[" . $i . "][" . $j . "]");
184 $dtpl->setVariable("PAR_TA_ID", "cell_" . $i . "_" . $j);
185 $dtpl->setVariable("PAR_TA_CONTENT", $s_text);
186
187 $cs = $res2->nodeset[$j]->get_attribute("ColSpan");
188 $rs = $res2->nodeset[$j]->get_attribute("RowSpan");
189 // $dtpl->setVariable("WIDTH", "140");
190 // $dtpl->setVariable("HEIGHT", "80");
191 if ($cs > 1) {
192 $dtpl->setVariable("COLSPAN", 'colspan="' . $cs . '"');
193 $dtpl->setVariable("WIDTH", (140 + ($cs - 1) * 146));
194 }
195 if ($rs > 1) {
196 $dtpl->setVariable("ROWSPAN", 'rowspan="' . $rs . '"');
197 $dtpl->setVariable("HEIGHT", (80 + ($rs - 1) * 86));
198 }
199 $dtpl->parseCurrentBlock();
200 }
201 }
202 $dtpl->setCurrentBlock("row");
203 $dtpl->parseCurrentBlock();
204 }
205
206 // init menues
207 $types = array("row", "col");
208 $moves = array("none", "backward", "both", "forward");
209 $commands = array(
210 "row" => array( "newRowAfter" => "cont_ed_new_row_after",
211 "newRowBefore" => "cont_ed_new_row_before",
212 "moveRowUp" => "cont_ed_row_up",
213 "moveRowDown" => "cont_ed_row_down",
214 "deleteRow" => "cont_ed_delete_row"),
215 "col" => array( "newColAfter" => "cont_ed_new_col_after",
216 "newColBefore" => "cont_ed_new_col_before",
217 "moveColLeft" => "cont_ed_col_left",
218 "moveColRight" => "cont_ed_col_right",
219 "deleteCol" => "cont_ed_delete_col")
220 );
221 foreach ($types as $type) {
222 foreach ($moves as $move) {
223 foreach ($commands[$type] as $command => $lang_var) {
224 if ($move == "none" && (substr($command, 0, 4) == "move" || substr($command, 0, 6) == "delete")) {
225 continue;
226 }
227 if (($move == "backward" && (in_array($command, array("movedown", "moveright")))) ||
228 ($move == "forward" && (in_array($command, array("moveup", "moveleft"))))) {
229 continue;
230 }
231 $this->tpl->setCurrentBlock("menu_item");
232 $this->tpl->setVariable("MENU_ITEM_TITLE", $lng->txt($lang_var));
233 $this->tpl->setVariable("CMD", $command);
234 $this->tpl->setVariable("TYPE", $type);
235 $this->tpl->parseCurrentBlock();
236 }
237 $this->tpl->setCurrentBlock("menu");
238 $this->tpl->setVariable("TYPE", $type);
239 $this->tpl->setVariable("MOVE", $move);
240 $this->tpl->parseCurrentBlock();
241 }
242 }
243
244 // update/cancel
245 $this->tpl->setCurrentBlock("commands");
246 $this->tpl->setVariable("BTN_NAME", "update");
247 $this->tpl->setVariable("BTN_TEXT", $this->lng->txt("save"));
248 $this->tpl->parseCurrentBlock();
249
250 $this->tpl->setVariable(
251 "FORMACTION2",
252 $ilCtrl->getFormAction($this, "tableAction")
253 );
254 $this->tpl->setVariable("TXT_ACTION", $this->lng->txt("cont_table"));
255 }
256
260 public function update($a_redirect = true)
261 {
263
264 // handle input data
265 include_once("./Services/COPage/classes/class.ilPCParagraph.php");
266 $data = array();
267 //var_dump($_POST["cell"]);
268 //var_dump($_GET);
269 if (is_array($_POST["cell"])) {
270 foreach ($_POST["cell"] as $i => $row) {
271 if (is_array($row)) {
272 foreach ($row as $j => $cell) {
273 $data[$i][$j] =
275 $cell,
276 $this->content_obj->getLanguage()
277 );
278 }
279 }
280 }
281 }
282
283 $this->updated = $this->content_obj->setData($data);
284
285 if ($this->updated !== true) {
286 $this->editData();
287 return;
288 }
289
290 $this->updated = $this->pg_obj->update();
291
292 if ($a_redirect) {
293 ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
294 $this->ctrl->redirect($this, "editData");
295 }
296 }
297
301 public function updateJS()
302 {
305
306 if ($_POST["cancel_update"]) {
307 // $this->ctrl->redirect($this, "editData");
308 $this->ctrl->returnToParent($this, "jump" . $this->hier_id);
309 }
310
311 // handle input data
312 include_once("./Services/COPage/classes/class.ilPCParagraph.php");
313 include_once("./Services/COPage/classes/class.ilPCParagraphGUI.php");
314 $data = array();
315 foreach ($_POST as $k => $content) {
316 if (substr($k, 0, 5) != "cell_") {
317 continue;
318 }
319
320 // determine cell content
321 $div = ilUtil::stripSlashes($content, false);
322 $p1 = strpos($div, '>');
323 $div = substr($div, $p1 + 1);
324 $div = "<div class='ilc_text_block_TableContent'>" . $div;
326 if ($text === false) {
327 $ilCtrl->returnToParent($this, "jump" . $this->hier_id);
328 }
329 $text = $text["text"];
330
332 $text,
333 $this->content_obj->getLanguage(),
334 true,
335 false
336 );
338
339 // set content in data array
340 $id = explode("_", $k);
341 $data[(int) $id[1]][(int) $id[2]] = $text;
342 }
343
344 // update data
345 $this->updated = $this->content_obj->setData($data);
346
347 if ($this->updated !== true) {
348 $this->editData();
349 return;
350 }
351
352 $this->updated = $this->pg_obj->update();
353
354
355 // perform table action? (move...?)
356 //$this->update(false);
357 $this->pg_obj->addHierIDs();
358 $failed = false;
359 if ($_POST["tab_cmd"] != "") {
360 $cell_hier_id = ($_POST["tab_cmd_type"] == "col")
361 ? $this->hier_id . "_1_" . ($_POST["tab_cmd_id"] + 1)
362 : $this->hier_id . "_" . ($_POST["tab_cmd_id"] + 1) . "_1";
363 $cell_obj = $this->pg_obj->getContentObject($cell_hier_id);
364 if (is_object($cell_obj)) {
365 $tab_cmd = $_POST["tab_cmd"];
366 $cell_obj->$tab_cmd();
367 $ret = $this->pg_obj->update();
368 if ($ret !== true) {
369 ilUtil::sendFailure($ret[0][1], true);
370 $failed = true;
371 }
372 }
373 }
374
375 if (!$failed) {
376 ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
377 }
378 if ($_POST["save_return"]) {
379 $this->ctrl->returnToParent($this, "jump" . $this->hier_id);
380 } else {
381 $this->ctrl->redirect($this, "editData");
382 }
383 }
384
385
389 public function getNewTableObject()
390 {
391 return new ilPCDataTable($this->getPage());
392 }
393
397 public function afterCreation()
398 {
400
401 $this->pg_obj->stripHierIDs();
402 $this->pg_obj->addHierIDs();
403 $ilCtrl->setParameter($this, "hier_id", $this->content_obj->readHierId());
404 $ilCtrl->setParameter($this, "pc_id", $this->content_obj->readPCId());
405 $this->content_obj->setHierId($this->content_obj->readHierId());
406 $this->setHierId($this->content_obj->readHierId());
407 $this->content_obj->setPCId($this->content_obj->readPCId());
408 $this->editData();
409 }
410
414 public function tableAction()
415 {
417
418 $this->update(false);
419 $this->pg_obj->addHierIDs();
420
421 $cell_hier_id = ($_POST["type"] == "col")
422 ? $this->hier_id . "_1_" . ($_POST["id"] + 1)
423 : $this->hier_id . "_" . ($_POST["id"] + 1) . "_1";
424 $cell_obj = $this->pg_obj->getContentObject($cell_hier_id);
425 if (is_object($cell_obj)) {
426 $action = (string) ($_POST["action"]);
427 $cell_obj->$action();
428 $_SESSION["il_pg_error"] = $this->pg_obj->update();
429 }
430 $ilCtrl->redirect($this, "editData");
431 }
432
436 public function setTabs()
437 {
439 $ilTabs = $this->tabs;
440
441 parent::setTabs();
442
443 $ilTabs->addTarget(
444 "cont_ed_edit_data",
445 $ilCtrl->getLinkTarget($this, "editData"),
446 "editData",
447 get_class($this)
448 );
449 }
450
451
455
459 public function editData()
460 {
464
465
466 $this->tool_context->current()->addAdditionalData(ilCOPageEditGSToolProvider::SHOW_EDITOR, true);
467
469 return $this->editDataCl();
470 }
471
472 //var_dump($_GET);
473 //var_dump($_POST);
474
475 $this->setTabs();
476
477 $this->displayValidationError();
478
479
480 include_once("./Services/COPage/classes/class.ilPCParagraph.php");
481
482 //$this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.tabledata2.html", "Services/COPage");
483 //$dtpl = $this->tpl;
484 $dtpl = new ilTemplate("tpl.tabledata2.html", true, true, "Services/COPage");
485 $dtpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this, "tableAction"));
486
487
488 $dtpl->setVariable(
489 "WYSIWYG_ACTION",
490 $ilCtrl->getFormAction($this, "updateJS")
491 );
492
493 // get all rows
494 $xpc = xpath_new_context($this->dom);
495 $path = "//PageContent[@HierId='" . $this->getHierId() . "']" .
496 "/Table/TableRow";
497 $res = xpath_eval($xpc, $path);
498
499 for ($i = 0; $i < count($res->nodeset); $i++) {
500 $xpc2 = xpath_new_context($this->dom);
501 $path2 = "//PageContent[@HierId='" . $this->getHierId() . "']" .
502 "/Table/TableRow[$i+1]/TableData";
503 $res2 = xpath_eval($xpc2, $path2);
504
505 // if this is the first row -> col icons
506 if ($i == 0) {
507 for ($j = 0; $j < count($res2->nodeset); $j++) {
508 if ($j == 0) {
509 $dtpl->touchBlock("empty_td");
510 }
511
512 if ($j == 0) {
513 if (count($res2->nodeset) == 1) {
514 $move_type = "none";
515 } else {
516 $move_type = "forward";
517 }
518 } elseif ($j == (count($res2->nodeset) - 1)) {
519 $move_type = "backward";
520 } else {
521 $move_type = "both";
522 }
523 $dtpl->setCurrentBlock("col_icon");
524 $dtpl->setVariable("COL_ICON_ALT", $lng->txt("content_column"));
525 $dtpl->setVariable("COL_ICON", ilUtil::getImagePath("col.svg"));
526 $dtpl->setVariable("COL_ONCLICK", "COL_" . $move_type);
527 $dtpl->setVariable("NR", $j);
528 $dtpl->parseCurrentBlock();
529 }
530 $dtpl->setCurrentBlock("row");
531 $dtpl->parseCurrentBlock();
532 }
533
534
535 for ($j = 0; $j < count($res2->nodeset); $j++) {
536 // first col: row icons
537 if ($j == 0) {
538 if ($i == 0) {
539 if (count($res->nodeset) == 1) {
540 $move_type = "none";
541 } else {
542 $move_type = "forward";
543 }
544 } elseif ($i == (count($res->nodeset) - 1)) {
545 $move_type = "backward";
546 } else {
547 $move_type = "both";
548 }
549 $dtpl->setCurrentBlock("row_icon");
550 $dtpl->setVariable("ROW_ICON_ALT", $lng->txt("content_row"));
551 $dtpl->setVariable("ROW_ICON", ilUtil::getImagePath("row.svg"));
552 $dtpl->setVariable("ROW_ONCLICK", "ROW_" . $move_type);
553 $dtpl->setVariable("NR", $i);
554 $dtpl->parseCurrentBlock();
555 }
556
557 // cell
558 if ($res2->nodeset[$j]->get_attribute("Hidden") != "Y") {
559 $dtpl->setCurrentBlock("cell");
560
561 if (is_array($_POST["cmd"]) && key($_POST["cmd"]) == "update") {
562 $s_text = ilUtil::stripSlashes("cell_" . $i . "_" . $j, false);
563 } else {
565 $this->content_obj->getCellText($i, $j),
566 true,
567 false
568 );
569 include_once("./Services/COPage/classes/class.ilPCParagraphGUI.php");
571 $s_text,
572 "TableContent",
573 $this->content_obj->readPCId() . "_" . $i . "_" . $j
574 );
575 }
576
577 // #20628
578 $s_text = str_replace("{", "&#123;", $s_text);
579 $s_text = str_replace("}", "&#125;", $s_text);
580
581 $dtpl->setVariable("PAR_TA_NAME", "cell[" . $i . "][" . $j . "]");
582 $dtpl->setVariable("PAR_TA_ID", "cell_" . $i . "_" . $j);
583
584 $dtpl->setVariable("PAR_TA_CONTENT", $s_text);
585
586 $cs = $res2->nodeset[$j]->get_attribute("ColSpan");
587 $rs = $res2->nodeset[$j]->get_attribute("RowSpan");
588 $dtpl->setVariable("WIDTH", "140");
589 $dtpl->setVariable("HEIGHT", "80");
590 if ($cs > 1) {
591 $dtpl->setVariable("COLSPAN", 'colspan="' . $cs . '"');
592 $dtpl->setVariable("WIDTH", (140 + ($cs - 1) * 146));
593 }
594 if ($rs > 1) {
595 $dtpl->setVariable("ROWSPAN", 'rowspan="' . $rs . '"');
596 $dtpl->setVariable("HEIGHT", (80 + ($rs - 1) * 86));
597 }
598 $dtpl->parseCurrentBlock();
599 }
600 }
601 $dtpl->setCurrentBlock("row");
602 $dtpl->parseCurrentBlock();
603 }
604
605 // init menues
606 $types = array("row", "col");
607 $moves = array("none", "backward", "both", "forward");
608 $commands = array(
609 "row" => array( "newRowAfter" => "cont_ed_new_row_after",
610 "newRowBefore" => "cont_ed_new_row_before",
611 "moveRowUp" => "cont_ed_row_up",
612 "moveRowDown" => "cont_ed_row_down",
613 "deleteRow" => "cont_ed_delete_row"),
614 "col" => array( "newColAfter" => "cont_ed_new_col_after",
615 "newColBefore" => "cont_ed_new_col_before",
616 "moveColLeft" => "cont_ed_col_left",
617 "moveColRight" => "cont_ed_col_right",
618 "deleteCol" => "cont_ed_delete_col")
619 );
620
621 foreach ($types as $type) {
622 foreach ($moves as $move) {
623 foreach ($commands[$type] as $command => $lang_var) {
624 if ($move == "none" && (substr($command, 0, 4) == "move" || substr($command, 0, 6) == "delete")) {
625 continue;
626 }
627 if (($move == "backward" && (in_array($command, array("movedown", "moveright")))) ||
628 ($move == "forward" && (in_array($command, array("moveup", "moveleft"))))) {
629 continue;
630 }
631 $dtpl->setCurrentBlock("menu_item");
632 $dtpl->setVariable("MENU_ITEM_TITLE", $lng->txt($lang_var));
633 $dtpl->setVariable("CMD", $command);
634 $dtpl->setVariable("TYPE", $type);
635 $dtpl->parseCurrentBlock();
636 }
637 $dtpl->setCurrentBlock("menu");
638 $dtpl->setVariable("TYPE", $type);
639 $dtpl->setVariable("MOVE", $move);
640 $dtpl->parseCurrentBlock();
641 }
642 }
643
644
645 $dtpl->setVariable(
646 "FORMACTION2",
647 $ilCtrl->getFormAction($this, "tableAction")
648 );
649 $dtpl->setVariable("TXT_ACTION", $this->lng->txt("cont_table"));
650
651 // js editing preparation
652 include_once("./Services/YUI/classes/class.ilYuiUtil.php");
656 $main_tpl->addJavascript("./libs/bower/bower_components/tinymce/tinymce.min.js");
657 $main_tpl->addJavaScript("./Services/COPage/js/ilcopagecallback.js");
658 $main_tpl->addJavascript("Services/COPage/js/page_editing.js");
659
660 $main_tpl->addOnloadCode("var preloader = new Image();
661 preloader.src = './templates/default/images/loader.svg';
662 ilCOPage.setContentCss('" .
664 ", " . ilUtil::getStyleSheetLocation() . ", ./Services/COPage/css/tiny_extra.css');
665 ilCOPage.editTD('cell_0_0');
666 ");
668 $GLOBALS["tpl"]->addOnloadCode("ilCOPage.addTextFormat('" . $c . "');");
669 }
670
671 $cfg = $this->getPageConfig();
672
673 $dtpl->setVariable(
674 "IL_TINY_MENU",
676 $this->pg_obj->getParentType(),
677 $cfg->getEnableInternalLinks(),
678 $cfg->getEnableWikiLinks(),
679 $cfg->getEnableKeywords(),
680 $this->getStyleId(),
681 false,
682 true,
683 $cfg->getEnableAnchors(),
684 false
685 )
686 );
687
688 // add int link parts
689 if ($cfg->getEnableInternalLinks() || $cfg->getEnableWikiLinks()) {
690 include_once("./Services/Link/classes/class.ilInternalLinkGUI.php");
691 $dtpl->setCurrentBlock("int_link_prep");
692 $dtpl->setVariable("INT_LINK_PREP", ilInternalLinkGUI::getInitHTML(
693 $ilCtrl->getLinkTargetByClass(
694 array("ilpageeditorgui", "ilinternallinkgui"),
695 "",
696 false,
697 true,
698 false
699 )
700 ));
701 }
702
703 $this->tpl->setContent($dtpl->get());
704 }
705}
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64
$failed
Definition: Utf8Test.php:85
$_POST["username"]
$_SESSION["AccountId"]
An exception for terminatinating execution or to throw for unit testing.
static getInitHTML($a_url)
Get initialisation HTML to use interna link editing.
static getContentStylePath($a_style_id, $add_random=true, $add_token=true)
get content style path
Class ilPCTableGUI.
getNewTableObject()
Get new table object.
update($a_redirect=true)
Update table data in dom and update page in db.
afterCreation()
After creation processing.
__construct(&$a_pg_obj, &$a_content_obj, $a_hier_id, $a_pc_id="")
Constructor @access public.
tableAction()
Perform operation on table (adding, moving, deleting rows/cols)
editDataCl()
Edit data of table.
editData()
Edit data of table.
updateJS()
Update via JavaScript.
executeCommand()
execute command
Class ilPCDataTable.
static xml2outputJS($s_text, $char, $a_pc_id)
Prepare content for js output.
static _getTextCharacteristics($a_style_id, $a_include_core=false)
Get text characteristics.
static _input2xml($a_text, $a_lang, $a_wysiwyg=0, $a_handle_lists=true)
converts user input to xml
static xml2output($a_text, $a_wysiwyg=false, $a_replace_lists=true, $unmask=true)
Converts xml from DB to output in edit textarea.
static handleAjaxContent($a_content)
Handle ajax content.
static handleAjaxContentPost($text)
Post input2xml handling of ajax content.
Class ilPCTableGUI.
getHierId()
get hierarchical id in dom object
getCharacteristicsOfCurrentStyle($a_type)
Get characteristics of current style.
getPageConfig()
Get Page Config.
displayValidationError()
display validation errors
getBBMenu($a_ta_name="par_content")
Get the bb menu incl.
setCharacteristics($a_chars)
Set Characteristics.
setHierId($a_hier_id)
get hierarchical id in dom object
static _doJSEditing()
checks if current user has activated js editing and if browser is js capable
static getTinyMenu( $a_par_type, $a_int_links=false, $a_wiki_links=false, $a_keywords=false, $a_style_id=0, $a_paragraph_styles=true, $a_save_return=true, $a_anchors=false, $a_save_new=true, $a_user_links=false)
Get Tiny Menu.
special template class to simplify handling of ITX/PEAR
static getStyleSheetLocation($mode="output", $a_css_name="", $a_css_location="")
get full style sheet file name (path inclusive) of current user
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
static initConnection(ilGlobalTemplateInterface $a_main_tpl=null)
Init YUI Connection module.
static initPanel($a_resize=false, ilGlobalTemplateInterface $a_main_tpl=null)
Init yui panel.
static initDragDrop(ilGlobalTemplateInterface $a_main_tpl=null)
Init YUI Drag and Drop.
global $ilCtrl
Definition: ilias.php:18
xpath_eval($xpath_context, $eval_str, $contextnode=null)
xpath_new_context($dom_document)
$i
Definition: metadata.php:24
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
$ret
Definition: parser.php:6
$type
foreach($_POST as $key=> $value) $res
$data
Definition: storeScorm.php:23
$DIC
Definition: xapitoken.php:46