31 protected \ILIAS\GlobalScreen\ScreenContext\ContextServices
$tool_context;
41 $this->
tabs = $DIC->tabs();
42 $this->
ctrl = $DIC->ctrl();
43 $this->
lng = $DIC->language();
44 $this->tpl = $DIC[
"tpl"];
45 $this->
user = $DIC->user();
48 $this->tool_context = $DIC->globalScreen()->tool()->context();
54 "Cell3" =>
"Cell3",
"Cell4" =>
"Cell4"));
65 $next_class = $this->
ctrl->getNextClass($this);
68 $cmd = $this->
ctrl->getCmd();
70 switch ($next_class) {
79 string $data_tab_txt_key =
"" 85 $ilTabs->setBackTarget(
87 (string) $this->
ctrl->getParentReturn($this)
90 if ($data_tab_txt_key ==
"") {
91 $data_tab_txt_key =
"cont_table_edit_cells";
96 $ilCtrl->getLinkTarget($this,
"editData"),
102 "cont_table_properties",
103 $ilCtrl->getLinkTarget($this,
"editProperties"),
109 "cont_table_cell_properties",
110 $ilCtrl->getLinkTarget($this,
"editCellStyle"),
121 $ilTabs->addSubTabTarget(
123 $ilCtrl->getLinkTarget($this,
"editCellStyle"),
128 $ilTabs->addSubTabTarget(
130 $ilCtrl->getLinkTarget($this,
"editCellWidth"),
135 $ilTabs->addSubTabTarget(
137 $ilCtrl->getLinkTarget($this,
"editCellAlignment"),
142 $ilTabs->addSubTabTarget(
144 $ilCtrl->getLinkTarget($this,
"editCellSpan"),
152 return parent::getTemplateOptions(
"table");
157 $this->
ctrl->redirect($this,
"editData");
169 $html = $this->
form->getHTML();
170 $html .=
"<br />" . $this->renderTable(
"");
176 if ($a_mode ===
"create") {
177 return $this->
lng->txt(
"cont_insert_table");
179 return $this->
lng->txt(
"cont_table_properties");
183 string $a_mode =
"edit" 185 $a_seleted_value =
"";
191 $this->
form->setFormAction($ilCtrl->getFormAction($this));
194 if ($a_mode ==
"create") {
196 for (
$i = 1;
$i <= 20;
$i++) {
202 $cols->setOptions($nr);
208 $rows->setOptions($nr);
216 $width->setMaxLength(6);
217 $this->
form->addItem($width);
221 $border->setInfo($this->
lng->txt(
"cont_table_border_info"));
222 $border->setValue(
"1px");
224 $border->setMaxLength(6);
225 $this->
form->addItem($border);
228 $padding =
new ilTextInputGUI($this->
lng->txt(
"cont_table_cellpadding"),
"padding");
229 $padding->setInfo($this->
lng->txt(
"cont_table_cellpadding_info"));
230 $padding->setValue(
"2px");
231 $padding->setSize(6);
232 $padding->setMaxLength(6);
233 $this->
form->addItem($padding);
237 $spacing->setValue(
"0px");
238 $this->
form->addItem($spacing);
242 $this->
lng->txt(
"cont_characteristic_table"),
247 $chars = array_merge($templates, $chars);
248 if (is_object($this->content_obj)) {
249 if (($chars[$a_seleted_value] ??
"") ==
"" && ($this->content_obj->getClass() !=
"")) {
250 $chars = array_merge(
251 array($this->content_obj->getClass() => $this->content_obj->getClass()),
256 foreach ($chars as $k => $char) {
257 if (strpos($k,
":") > 0) {
258 $t = explode(
":", $k);
259 $html = $this->style->lookupTemplatePreview($t[1]) .
'<div style="clear:both;" class="small">' . $char .
"</div>";
261 $html =
'<table class="ilc_table_' . $k .
'"><tr><td class="small">' .
262 $char .
'</td></tr></table>';
264 $char_prop->addOption($k, $char, $html);
266 $char_prop->setValue(
"StandardTable");
267 $this->
form->addItem($char_prop);
270 for (
$i = 0;
$i <= 3;
$i++) {
276 $rh->setOptions($nr);
278 $this->
form->addItem($rh);
282 $rf->setOptions($nr);
284 $this->
form->addItem($rf);
288 $ch->setOptions($nr);
290 $this->
form->addItem($ch);
294 $cf->setOptions($nr);
296 $this->
form->addItem($cf);
298 if ($a_mode ==
"create") {
301 $this->
lng->txt(
"cont_first_row_style"),
307 $options = array_merge(array(
"" => $this->
lng->txt(
"none")), $chars);
308 foreach ($options as $k => $option) {
309 $html =
'<table border="0" cellspacing="0" cellpadding="0"><tr><td class="ilc_table_cell_' . $k .
'">' .
310 $option .
'</td></tr></table>';
311 $fr_style->addOption($k, $option, $html);
314 $fr_style->setValue(
"");
315 $this->
form->addItem($fr_style);
319 $align_opts = array(
"Left" =>
$lng->
txt(
"cont_left"),
320 "Right" =>
$lng->
txt(
"cont_right"),
"Center" =>
$lng->
txt(
"cont_center"),
321 "LeftFloat" =>
$lng->
txt(
"cont_left_float"),
322 "RightFloat" =>
$lng->
txt(
"cont_right_float"));
324 $align->setOptions($align_opts);
325 $align->setValue(
"Center");
326 $this->
form->addItem($align);
330 $caption->setSize(60);
331 $this->
form->addItem($caption);
334 $ca_opts = array(
"top" =>
$lng->
txt(
"cont_top"),
335 "bottom" =>
$lng->
txt(
"cont_bottom"));
337 $this->
lng->txt(
"cont_align"),
340 $ca->setOptions($ca_opts);
341 $caption->addSubItem($ca);
344 if ($a_mode ==
"create") {
348 $import->addOption($op);
349 $op2 =
new ilRadioOption($this->
lng->txt(
"cont_spreadsheet_table"),
"spreadsheet");
352 $import_data->setRows(8);
353 $import_data->setCols(50);
356 $import->addOption($op2);
357 $import->setValue(
"html");
358 $this->
form->addItem($import);
365 $s_lang =
$ilUser->getLanguage();
369 $language->setOptions(
$lang);
370 $language->setValue($s_lang);
371 $this->
form->addItem($language);
373 if ($a_mode ==
"create") {
374 $this->
form->addCommandButton(
"create_tab",
$lng->
txt(
"save"));
375 $this->
form->addCommandButton(
"cancelCreate",
$lng->
txt(
"cancel"));
377 $this->
form->addCommandButton(
"saveProperties",
$lng->
txt(
"save"));
384 $values[
"width"] = $this->content_obj->getWidth();
385 $values[
"border"] = $this->content_obj->getBorder();
386 $values[
"padding"] = $this->content_obj->getCellPadding();
387 $values[
"spacing"] = $this->content_obj->getCellSpacing();
388 $values[
"row_header"] = $this->content_obj->getHeaderRows();
389 $values[
"row_footer"] = $this->content_obj->getFooterRows();
390 $values[
"col_header"] = $this->content_obj->getHeaderCols();
391 $values[
"col_footer"] = $this->content_obj->getFooterCols();
392 if ($this->content_obj->getTemplate() !=
"") {
393 $values[
"characteristic"] =
"t:" .
395 $this->content_obj->getTemplate();
397 $values[
"characteristic"] = $this->content_obj->getClass();
399 $values[
"align"] = $this->content_obj->getHorizontalAlign();
400 $values[
"caption"] = $this->content_obj->getCaption();
401 $values[
"cap_align"] = $this->content_obj->getCaptionAlign();
402 $values[
"language"] = $this->content_obj->getLanguage();
404 $this->
form->setValuesByArray($values);
406 $ca = $this->
form->getItemByPostVar(
"cap_align");
407 $ca->setValue($this->content_obj->getCaptionAlign());
410 public function renderTable(
411 string $a_mode =
"table_edit",
412 string $a_submode =
"" 415 $tab_node = $this->content_obj->getNode();
416 $tab_node->set_attribute(
"Enabled",
"True");
417 $content = $this->dom->dump_node($tab_node);
419 $trans = $this->pg_obj->getLanguageVariablesXML();
420 $mobs = $this->pg_obj->getMultimediaXML();
428 $content = $content .
$mobs . $trans . $template_xml;
437 !$this->pg_obj->getPageConfig()->getPreventHTMLUnmasking(),
444 string $a_mode =
"table_edit",
445 string $a_submode =
"",
454 $content =
"<dummy>" . $content .
"</dummy>";
456 $xsl = file_get_contents(
"./Services/COPage/xsl/page.xsl");
457 $args = array(
'/_xml' => $content,
'/_xsl' => $xsl );
463 $params = array(
'mode' => $a_mode,
464 'webspace_path' => $wb_path,
'enlarge_path' => $enlarge_path);
465 $output = xslt_process($xh,
"arg:/_xml",
"arg:/_xsl", null, $args,
$params);
471 $output = str_replace(
"<",
"<", $output);
472 $output = str_replace(
">",
">", $output);
473 $output = str_replace(
"&",
"&", $output);
476 if ($a_mode ==
"table_edit" && !is_null($a_table_obj)) {
477 switch ($a_submode) {
497 if (isset($page_object)) {
499 foreach ($defs as $def) {
500 $pc_class = $def[
"pc_class"];
501 $pc_obj =
new $pc_class($page_object);
504 $output = $pc_obj->modifyPageContentPostXsl($output,
"presentation",
false);
520 $lng = $DIC->language();
524 foreach ($classes as $k => $v) {
528 if (substr($v, 0, 4) ==
"ilc_") {
532 '<input type="checkbox" value="1"' .
533 ' name="target[' . $k .
']">' .
'</input> ' . $v;
535 $a_output = str_replace(
"{{{{{TableEdit;" . $k .
"}}}}}",
$check, $a_output);
549 $lng = $DIC->language();
553 foreach ($classes as $k => $v) {
558 '<input type="checkbox" value="1"' .
559 ' name="target[' . $k .
']">' .
'</input> ' . $v;
561 $a_output = str_replace(
"{{{{{TableEdit;" . $k .
"}}}}}",
$check, $a_output);
575 $lng = $DIC->language();
579 foreach ($widths as $k => $v) {
581 '<input class="small" type="text" size="5" maxlength="10"' .
582 ' name="width[' . $k .
']" value="' . $v .
'">' .
'</input>';
584 $a_output = str_replace(
"{{{{{TableEdit;" . $k .
"}}}}}",
$check, $a_output);
598 $lng = $DIC->language();
602 foreach ($spans as $k => $v) {
604 $selects =
'<div style="white-space:nowrap;">' .
$lng->
txt(
"cont_colspan") .
": " .
605 '<select class="small" name="colspan[' . $k .
']">';
606 for (
$i = 1;
$i <= $v[
"max_x"] - $v[
"x"] + 1;
$i++) {
607 $sel_str = (
$i == $v[
"colspan"])
608 ?
'selected="selected"' 610 $selects .=
'<option value="' .
$i .
'" ' . $sel_str .
'>' .
$i .
'</option>';
612 $selects .=
"</select></div>";
615 $selects .=
'<div style="margin-top:3px; white-space:nowrap;">' .
$lng->
txt(
"cont_rowspan") .
": " .
616 '<select class="small" name="rowspan[' . $k .
']">';
617 for (
$i = 1;
$i <= $v[
"max_y"] - $v[
"y"] + 1;
$i++) {
618 $sel_str = (
$i == $v[
"rowspan"])
619 ?
'selected="selected"' 621 $selects .=
'<option value="' .
$i .
'" ' . $sel_str .
'>' .
$i .
'</option>';
623 $selects .=
"</select></div>";
625 $a_output = str_replace(
"{{{{{TableEdit;" . $k .
"}}}}}", $selects, $a_output);
640 $ilTabs->setSubTabActive(
"cont_style");
645 $form->
setTitle($this->
lng->txt(
"cont_table_cell_properties"));
649 $this->
lng->txt(
"cont_style"),
655 $options = array_merge(array(
"" => $this->
lng->txt(
"none")),
$chars);
656 foreach ($options as $k => $option) {
657 $html =
'<table border="0" cellspacing="0" cellpadding="0"><tr><td class="ilc_table_cell_' . $k .
'">' .
658 $option .
'</td></tr></table>';
659 $style->addOption($k, $option, $html);
670 $html .=
"<br />" . $this->renderTable(
"table_edit",
"style") .
"</form>";
684 $ilTabs->setSubTabActive(
"cont_width");
685 $ilTabs->setTabActive(
"cont_table_cell_properties");
687 $ctpl =
new ilTemplate(
"tpl.table_cell_properties.html",
true,
true,
"Services/COPage");
688 $ctpl->setVariable(
"BTN_NAME",
"setWidths");
689 $ctpl->setVariable(
"BTN_TEXT",
$lng->
txt(
"cont_save_widths"));
690 $ctpl->setVariable(
"FORMACTION", $ilCtrl->getFormAction($this));
692 $html = $ctpl->get();
693 $html .=
"<br />" . $this->renderTable(
"table_edit",
"width") .
"</form>";
707 $ilTabs->setSubTabActive(
"cont_span");
708 $ilTabs->setTabActive(
"cont_table_cell_properties");
710 $ctpl =
new ilTemplate(
"tpl.table_cell_properties.html",
true,
true,
"Services/COPage");
711 $ctpl->setVariable(
"BTN_NAME",
"setSpans");
712 $ctpl->setVariable(
"BTN_TEXT",
$lng->
txt(
"cont_save_spans"));
713 $ctpl->setVariable(
"FORMACTION", $ilCtrl->getFormAction($this));
715 $html = $ctpl->get();
716 $html .=
"<br />" . $this->renderTable(
"table_edit",
"span") .
"</form>";
727 $target = $this->request->getStringArray(
"target");
728 if (count($target)) {
729 foreach ($target as $k => $value) {
731 $cid = explode(
":", $k);
732 $this->content_obj->setTDClass(
734 $this->request->getString(
"style"),
740 $this->updated = $this->pg_obj->update();
741 $this->tpl->setOnScreenMessage(
'success',
$lng->
txt(
"msg_obj_modified"),
true);
742 $this->
ctrl->redirect($this,
"editCellStyle");
752 $widths = $this->request->getStringArray(
"width");
753 if (count($widths) > 0) {
754 foreach ($widths as $k => $width) {
755 $cid = explode(
":", $k);
756 $this->content_obj->setTDWidth(
763 $this->updated = $this->pg_obj->update();
764 $this->tpl->setOnScreenMessage(
'success',
$lng->
txt(
"msg_obj_modified"),
true);
765 $this->
ctrl->redirect($this,
"editCellWidth");
775 $colspans = $this->request->getStringArray(
"colspan");
776 $rowspans = $this->request->getStringArray(
"rowspan");
779 if (count($colspans) > 0) {
780 foreach ($colspans as $k => $span) {
782 $rs[$k] = $rowspans[$k];
784 $this->content_obj->setTDSpans($cs, $rs);
786 $this->updated = $this->pg_obj->update();
787 $this->tpl->setOnScreenMessage(
'success',
$lng->
txt(
"msg_obj_modified"),
true);
788 $this->
ctrl->redirect($this,
"editCellSpan");
797 $this->
form->checkInput();
800 $caption = $this->
form->getInput(
"caption");
801 $caption = str_replace(
"&",
"&", $caption);
802 $caption = str_replace(
"<",
"<", $caption);
803 $caption = str_replace(
">",
">", $caption);
805 $this->content_obj->setLanguage($this->
form->getInput(
"language"));
806 $this->content_obj->setWidth($this->
form->getInput(
"width"));
807 $this->content_obj->setBorder($this->
form->getInput(
"border"));
808 $this->content_obj->setCellSpacing($this->
form->getInput(
"spacing"));
809 $this->content_obj->setCellPadding($this->
form->getInput(
"padding"));
810 $this->content_obj->setHorizontalAlign($this->
form->getInput(
"align"));
811 $this->content_obj->setHeaderRows($this->
form->getInput(
"row_header"));
812 $this->content_obj->setHeaderCols($this->
form->getInput(
"col_header"));
813 $this->content_obj->setFooterRows($this->
form->getInput(
"row_footer"));
814 $this->content_obj->setFooterCols($this->
form->getInput(
"col_footer"));
815 if (strpos($this->
form->getInput(
"characteristic"),
":") > 0) {
816 $t = explode(
":", $this->
form->getInput(
"characteristic"));
817 $this->content_obj->setTemplate($t[2]);
818 $this->content_obj->setClass(
"");
820 $this->content_obj->setClass($this->
form->getInput(
"characteristic"));
821 $this->content_obj->setTemplate(
"");
823 $this->content_obj->setCaption(
825 $this->
form->getInput(
"cap_align")
835 $this->updated = $this->pg_obj->update();
836 if ($this->updated ===
true) {
837 $this->
ctrl->redirect($this,
"editProperties");
840 $this->pg_obj->addHierIDs();
847 $this->content_obj->setHorizontalAlign(
"Right");
853 $this->content_obj->setHorizontalAlign(
"Left");
859 $this->content_obj->setHorizontalAlign(
"Center");
865 $this->content_obj->setHorizontalAlign(
"LeftFloat");
871 $this->content_obj->setHorizontalAlign(
"RightFloat");
881 $html = $this->
form->getHTML();
896 $this->content_obj->create($this->pg_obj, $this->hier_id, $this->pc_id);
899 $this->
form->checkInput();
901 $import_table = trim($this->
form->getInput(
"import_table"));
904 if (!empty($import_table)) {
905 switch ($this->
form->getInput(
"import_type")) {
908 $res = $this->content_obj->importHtml(
909 $this->
form->getInput(
"language"),
913 $this->tpl->setOnScreenMessage(
'failure',
$res);
921 $this->content_obj->importSpreadsheet($this->
form->getInput(
"language"), $import_table);
925 $this->content_obj->addRows(
926 $this->
form->getInput(
"nr_rows"),
927 $this->
form->getInput(
"nr_cols")
933 $frtype = $this->
form->getInput(
"first_row_style");
935 $this->content_obj->setFirstRowStyle($frtype);
938 $this->updated = $this->pg_obj->update();
940 if ($this->updated ===
true) {
949 $this->
ctrl->returnToParent($this,
"jump" . $this->hier_id);
967 $ilTabs->setSubTabActive(
"cont_alignment");
968 $ilTabs->setTabActive(
"cont_table_cell_properties");
973 $form->
setTitle($this->
lng->txt(
"cont_table_cell_properties"));
978 "Left" =>
$lng->
txt(
"cont_left"),
979 "Center" =>
$lng->
txt(
"cont_center"),
980 "Right" =>
$lng->
txt(
"cont_right")
983 $si->setOptions($options);
992 $html .=
"<br />" . $this->renderTable(
"table_edit",
"alignment") .
"</form>";
1003 $targets = $this->request->getStringArray(
"target");
1004 if (count($targets) > 0) {
1005 foreach ($targets as $k => $value) {
1007 $cid = explode(
":", $k);
1008 $this->content_obj->setTDAlignment(
1010 $this->request->getString(
"alignment"),
1016 $this->updated = $this->pg_obj->update();
1017 $this->tpl->setOnScreenMessage(
'success',
$lng->
txt(
"msg_obj_modified"),
true);
1019 $this->
ctrl->redirect($this,
"editCellAlignment");
1027 $collection = $this->tool_context->current()->getAdditionalData();
1046 $editor_init = new \ILIAS\COPage\Editor\UI\Init();
1047 $editor_init->initUI($this->tpl);
1056 $dtpl =
new ilTemplate(
"tpl.tabledata2.html",
true,
true,
"Services/COPage");
1057 $dtpl->setVariable(
"FORMACTION", $this->
ctrl->getFormAction($this,
"tableAction"));
1058 $dtpl->setVariable(
"HIERID", $this->hier_id);
1059 $dtpl->setVariable(
"PCID", $this->pc_id);
1063 $ilCtrl->getFormAction($this,
"updateJS")
1072 for (
$i = 0;
$i < count(
$res->nodeset);
$i++) {
1074 $path2 =
"//PageContent[@HierId='" . $this->
getHierId() .
"']" .
1075 "/Table/TableRow[$i+1]/TableData";
1080 for ($j = 0; $j < count($res2->nodeset); $j++) {
1082 $dtpl->touchBlock(
"empty_td");
1085 $move_forward =
false;
1086 $move_backward =
false;
1088 if (count($res2->nodeset) == 1) {
1091 $move_forward =
true;
1093 } elseif ($j == (count($res2->nodeset) - 1)) {
1094 $move_backward =
true;
1096 $move_forward =
true;
1097 $move_backward =
true;
1099 $dtpl->setCurrentBlock(
"col_icon");
1100 $dtpl->setVariable(
"NR_COLUMN", $j + 1);
1101 $dtpl->setVariable(
"PCID_COLUMN", $res2->nodeset[$j]->get_attribute(
"PCID"));
1103 $dtpl->parseCurrentBlock();
1105 $dtpl->setCurrentBlock(
"row");
1106 $dtpl->parseCurrentBlock();
1109 for ($j = 0; $j < count($res2->nodeset); $j++) {
1113 if (count(
$res->nodeset) == 1) {
1114 $move_type =
"none";
1116 $move_type =
"forward";
1118 } elseif (
$i == (count(
$res->nodeset) - 1)) {
1119 $move_type =
"backward";
1121 $move_type =
"both";
1123 $dtpl->setCurrentBlock(
"row_icon");
1124 $dtpl->setVariable(
"NR_ROW",
$i + 1);
1125 $dtpl->setVariable(
"PCID_ROW", $res2->nodeset[$j]->get_attribute(
"PCID"));
1126 $dtpl->setVariable(
"ROW_CAPTION",
$i + 1);
1127 $dtpl->parseCurrentBlock();
1131 if ($res2->nodeset[$j]->get_attribute(
"Hidden") !=
"Y") {
1132 if ($this->content_obj->getType() ==
"dtab") {
1133 $dtpl->touchBlock(
"cell_type");
1138 $dtpl->setCurrentBlock(
"cell");
1140 $dtpl->setVariable(
"PAR_TA_NAME",
"cell[" .
$i .
"][" . $j .
"]");
1141 $dtpl->setVariable(
"PAR_TA_ID",
"cell_" .
$i .
"_" . $j);
1142 $dtpl->setVariable(
"PAR_ROW", (
string)
$i);
1143 $dtpl->setVariable(
"PAR_COLUMN", (
string) $j);
1150 $cs = $res2->nodeset[$j]->get_attribute(
"ColSpan");
1151 $rs = $res2->nodeset[$j]->get_attribute(
"RowSpan");
1152 $dtpl->setVariable(
"WIDTH",
"140");
1153 $dtpl->setVariable(
"HEIGHT",
"80");
1155 $dtpl->setVariable(
"COLSPAN",
'colspan="' . $cs .
'"');
1156 $dtpl->setVariable(
"WIDTH", (140 + ($cs - 1) * 146));
1159 $dtpl->setVariable(
"ROWSPAN",
'rowspan="' . $rs .
'"');
1160 $dtpl->setVariable(
"HEIGHT", (80 + ($rs - 1) * 86));
1162 $dtpl->parseCurrentBlock();
1165 $dtpl->setCurrentBlock(
"row");
1166 $dtpl->parseCurrentBlock();
1169 $dtpl->setVariable(
"TXT_ACTION", $this->
lng->txt(
"cont_table"));
1172 $dtpl->setCurrentBlock(
"int_link_prep");
1176 $ilCtrl->getLinkTargetByClass(
1177 array(
"ilpageeditorgui",
"ilinternallinkgui"),
1185 $dtpl->parseCurrentBlock();
1188 $dtpl->touchBlock(
"script");
1191 return $dtpl->get();
1199 $chr = ($nr - 1) %
$base;
1200 $cap = chr($chr + 65) . $cap;
1201 $nr = ($nr - 1 - $chr) /
$base;
1208 $tab_node = $this->content_obj->getNode();
1213 foreach ($tab_node->first_child()->child_nodes() as $child) {
1216 foreach ($child->child_nodes() as $child2) {
1218 foreach ($child2->child_nodes() as $cell_content_node) {
1219 $content .= $this->dom->dump_node($cell_content_node);
1227 $trans = $this->pg_obj->getLanguageVariablesXML();
1228 $mobs = $this->pg_obj->getMultimediaXML();
1236 $content = $content .
$mobs . $trans . $template_xml;
1240 !$this->pg_obj->getPageConfig()->getPreventHTMLUnmasking(),
1256 $content =
"<dummy>" . $content .
"</dummy>";
1258 $xsl = file_get_contents(
"./Services/COPage/xsl/page.xsl");
1259 $args = array(
'/_xml' => $content,
'/_xsl' => $xsl );
1263 $params = array(
'webspace_path' => $wb_path,
'enlarge_path' => $enlarge_path);
1264 $output = xslt_process($xh,
"arg:/_xml",
"arg:/_xsl", null, $args,
$params);
1269 $output = str_replace(
"<",
"<", $output);
1270 $output = str_replace(
">",
">", $output);
1271 $output = str_replace(
"&",
"&", $output);
1275 if (isset($page_object)) {
1277 foreach ($defs as $def) {
1279 $pc_class = $def[
"pc_class"];
1280 $pc_obj =
new $pc_class($page_object);
1283 $output = $pc_obj->modifyPageContentPostXsl((
string) $output,
"presentation",
false);
xpath_eval(php4DOMXPath $xpath_context, string $eval_str, $contextnode=null)
static getWebspaceDir(string $mode="filesystem")
get webspace directory
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
editData()
Edit data of table.
ilPageContent $content_obj
renderCell( $content, $unmask=true, $page_object=null)
Static render table function.
static getInitHTML(string $a_url)
Get initialisation HTML to use internal link editing.
getCharacteristicsOfCurrentStyle(array $a_type)
Get characteristics of current style and call setCharacteristics, if style is given.
static _renderTable(string $content, string $a_mode="table_edit", string $a_submode="", ilPCTable $a_table_obj=null, bool $unmask=true, ilPageObject $page_object=null)
setAlignment()
Set cell alignments.
initPropertiesForm(string $a_mode="edit")
__construct(ilPageObject $a_pg_obj, ?ilPageContent $a_content_obj, string $a_hier_id, string $a_pc_id="")
static _lookupTemplateIdByName(int $a_style_id, string $a_name)
Lookup table template preview.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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...
if(! $DIC->user() ->getId()||!ilLTIConsumerAccess::hasCustomProviderCreationAccess()) $params
setCellPropertiesSubTabs()
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
static getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
setStyles()
Set cell styles.
static getPCDefinitions()
static _addStyleCheckboxes(string $a_output, ilPCTable $a_table)
Add style checkboxes in edit mode.
setCharacteristics(array $a_chars)
create()
create new table in dom and update page in db
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ILIAS GlobalScreen ScreenContext ContextServices $tool_context
xpath_new_context($dom_document)
static _addSpanInputs(string $a_output, ilPCTable $a_table)
Add span inputs.
User Interface for Editing of Page Content Objects (Paragraphs, Tables, ...)
setContent(string $a_html)
Sets content for standard template.
setBasicTableCellStyles()
getTemplateXML()
Get table template xml.
static _addAlignmentCheckboxes(string $a_output, ilPCTable $a_table)
Add alignment checkboxes in edit mode.
Class ilPageObject Handles PageObjects of ILIAS Learning Modules (see ILIAS DTD)
getFormTitle(string $a_mode="edit")
ilGlobalTemplateInterface $tpl
setEditorToolContext()
Set editor tool context.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getColumnCaption(int $nr)
form( $class_path, string $cmd)
getAllCellWidths()
Get all cell widths.
saveProperties()
save table properties in db and return to page edit screen
getEditDataTable(bool $initial=false)
getAllCellSpans()
Get all cell spans.
setTabs(string $data_tab_txt_key="")
__construct(Container $dic, ilPlugin $plugin)
getTemplateOptions(string $a_type="")
This class represents a text area property in a property form.
setProperties()
Set properties from input form.
static _addWidthInputs(string $a_output, ilPCTable $a_table)
Add width inputs.
static _lookupType(int $id, bool $reference=false)
getAllCellClasses()
Get all cell classes.
setWidths()
Set cell widths.
getPropertiesFormValues()
setSpans()
Set cell spans.
getCellContent(int $i, int $j)