30 protected \ILIAS\COPage\Xsl\XslManager
$xsl;
43 $this->
tabs = $DIC->tabs();
44 $this->
ctrl = $DIC->ctrl();
45 $this->
lng = $DIC->language();
46 $this->tpl = $DIC[
"tpl"];
47 $this->
user = $DIC->user();
50 $this->tool_context = $DIC->globalScreen()->tool()->context();
51 $this->xsl = $DIC->copage()->internal()->domain()->xsl();
52 $this->pc_definition = $DIC
58 $this->dom_util = $DIC->copage()->internal()->domain()->domUtil();
64 "Cell3" =>
"Cell3",
"Cell4" =>
"Cell4"));
75 $next_class = $this->
ctrl->getNextClass($this);
78 $cmd = $this->
ctrl->getCmd();
80 switch ($next_class) {
89 string $data_tab_txt_key =
"" 95 $ilTabs->setBackTarget(
102 $ilTabs->setBackTarget(
104 (string) $this->
ctrl->getParentReturn($this)
107 if ($data_tab_txt_key ==
"") {
108 $data_tab_txt_key =
"cont_table_edit_cells";
113 $ilCtrl->getLinkTarget($this,
"editData"),
119 "cont_table_properties",
120 $ilCtrl->getLinkTarget($this,
"editProperties"),
126 "cont_table_cell_properties",
127 $ilCtrl->getLinkTarget($this,
"editCellStyle"),
138 $ilTabs->addSubTabTarget(
140 $ilCtrl->getLinkTarget($this,
"editCellStyle"),
145 $ilTabs->addSubTabTarget(
147 $ilCtrl->getLinkTarget($this,
"editCellWidth"),
152 $ilTabs->addSubTabTarget(
154 $ilCtrl->getLinkTarget($this,
"editCellAlignment"),
159 $ilTabs->addSubTabTarget(
161 $ilCtrl->getLinkTarget($this,
"editCellSpan"),
169 return parent::getTemplateOptions(
"table");
174 $this->
ctrl->redirect($this,
"editData");
186 $html = $this->
form->getHTML();
187 $html .=
"<br />" . $this->renderTable(
"");
193 if ($a_mode ===
"create") {
194 return $this->
lng->txt(
"cont_insert_table");
196 return $this->
lng->txt(
"cont_table_properties");
200 string $a_mode =
"edit" 202 $a_seleted_value =
"";
208 $this->
form->setFormAction($ilCtrl->getFormAction($this));
211 if ($a_mode ==
"create") {
213 for ($i = 1; $i <= 20; $i++) {
221 $this->
form->addItem($cols);
227 $this->
form->addItem($rows);
233 $width->setMaxLength(6);
234 $this->
form->addItem($width);
260 $this->
lng->txt(
"cont_characteristic_table"),
265 $chars = array_merge($templates, $chars);
266 if (is_object($this->content_obj)) {
267 if (($chars[$a_seleted_value] ??
"") ==
"" && ($this->content_obj->getClass() !=
"")) {
268 $chars = array_merge(
269 array($this->content_obj->getClass() => $this->content_obj->getClass()),
274 foreach ($chars as $k => $char) {
275 if (strpos($k,
":") > 0) {
276 $t = explode(
":", $k);
277 $html = $this->style->lookupTemplatePreview($t[1]) .
'<div style="clear:both;" class="small">' . $char .
"</div>";
279 $html =
'<table class="ilc_table_' . $k .
'"><tr><td class="small">' .
280 $char .
'</td></tr></table>';
282 $char_prop->addOption($k, $char, $html);
284 $char_prop->setValue(
"StandardTable");
285 $this->
form->addItem($char_prop);
288 for ($i = 0; $i <= 3; $i++) {
296 $this->
form->addItem($rh);
302 $this->
form->addItem($rf);
308 $this->
form->addItem($ch);
314 $this->
form->addItem($cf);
316 if ($a_mode ==
"create") {
319 $this->
lng->txt(
"cont_first_row_style"),
325 $options = array_merge(array(
"" => $this->
lng->txt(
"none")), $chars);
326 foreach ($options as $k => $option) {
327 $html =
'<table border="0" cellspacing="0" cellpadding="0"><tr><td class="ilc_table_cell_' . $k .
'">' .
328 $option .
'</td></tr></table>';
329 $fr_style->addOption($k, $option, $html);
332 $fr_style->setValue(
"");
333 $this->
form->addItem($fr_style);
337 $align_opts = array(
"Left" =>
$lng->
txt(
"cont_left"),
338 "Right" =>
$lng->
txt(
"cont_right"),
"Center" =>
$lng->
txt(
"cont_center"),
339 "LeftFloat" =>
$lng->
txt(
"cont_left_float"),
340 "RightFloat" =>
$lng->
txt(
"cont_right_float"));
343 $align->setValue(
"Center");
344 $this->
form->addItem($align);
348 $caption->setSize(60);
349 $this->
form->addItem($caption);
352 $ca_opts = array(
"top" =>
$lng->
txt(
"cont_top"),
353 "bottom" =>
$lng->
txt(
"cont_bottom"));
355 $this->
lng->txt(
"cont_align"),
359 $caption->addSubItem($ca);
362 if ($a_mode ==
"create") {
366 $import->addOption($op);
367 $op2 =
new ilRadioOption($this->
lng->txt(
"cont_spreadsheet_table"),
"spreadsheet");
370 $import_data->setRows(8);
371 $import_data->setCols(50);
374 $import->addOption($op2);
375 $import->setValue(
"html");
376 $this->
form->addItem($import);
383 $s_lang = $ilUser->getLanguage();
388 $language->setValue($s_lang);
389 $this->
form->addItem($language);
391 if ($a_mode ==
"create") {
392 $this->
form->addCommandButton(
"create_tab",
$lng->
txt(
"save"));
393 $this->
form->addCommandButton(
"cancelCreate",
$lng->
txt(
"cancel"));
395 $this->
form->addCommandButton(
"saveProperties",
$lng->
txt(
"save"));
396 $this->
form->addCommandButton(
"editData",
$lng->
txt(
"close"));
403 $values[
"width"] = $this->content_obj->getWidth();
407 $values[
"row_header"] = $this->content_obj->getHeaderRows();
408 $values[
"row_footer"] = $this->content_obj->getFooterRows();
409 $values[
"col_header"] = $this->content_obj->getHeaderCols();
410 $values[
"col_footer"] = $this->content_obj->getFooterCols();
411 if ($this->content_obj->getTemplate() !=
"") {
412 $values[
"characteristic"] =
"t:" .
414 $this->content_obj->getTemplate();
416 $values[
"characteristic"] = $this->content_obj->getClass();
418 $values[
"align"] = $this->content_obj->getHorizontalAlign();
419 $values[
"caption"] = $this->content_obj->getCaption();
420 $values[
"cap_align"] = $this->content_obj->getCaptionAlign();
421 $values[
"language"] = $this->content_obj->getLanguage();
423 $this->
form->setValuesByArray($values);
425 $ca = $this->
form->getItemByPostVar(
"cap_align");
426 $ca->setValue($this->content_obj->getCaptionAlign());
429 public function renderTable(
430 string $a_mode =
"table_edit",
431 string $a_submode =
"" 434 $tab_node = $this->content_obj->getDomNode();
435 $tab_node->setAttribute(
"Enabled",
"True");
436 $content = $this->dom_util->dump($tab_node);
438 $trans = $this->pg_obj->getLanguageVariablesXML();
439 $mobs = $this->pg_obj->getMultimediaXML();
447 $content = $content . $mobs . $trans . $template_xml;
456 !$this->pg_obj->getPageConfig()->getPreventHTMLUnmasking(),
463 string $a_mode =
"table_edit",
464 string $a_submode =
"",
471 $ilUser = $DIC->user();
472 $xsl = $DIC->copage()->internal()->domain()->xsl();
473 $pc_definition = $DIC->copage()->internal()->domain()->pc()->definition();
475 $content =
"<dummy>" . $content .
"</dummy>";
479 $params = array(
'mode' => $a_mode,
480 'webspace_path' => $wb_path,
'enlarge_path' => $enlarge_path);
481 $output = $xsl->process($content,
$params);
485 $output = str_replace(
"<",
"<", $output);
486 $output = str_replace(
">",
">", $output);
487 $output = str_replace(
"&",
"&", $output);
490 if ($a_mode ==
"table_edit" && !is_null($a_table_obj)) {
491 switch ($a_submode) {
511 if (isset($page_object)) {
512 $defs = $pc_definition->getPCDefinitions();
513 foreach ($defs as $def) {
514 $pc_class = $def[
"pc_class"];
515 $pc_obj =
new $pc_class($page_object);
518 $output = $pc_obj->modifyPageContentPostXsl($output,
"presentation",
false);
534 $lng = $DIC->language();
538 foreach ($classes as $k => $v) {
542 if (substr($v, 0, 4) ==
"ilc_") {
546 '<input type="checkbox" value="1"' .
547 ' name="target[' . $k .
']">' .
'</input> ' . $v;
549 $a_output = str_replace(
"{{{{{TableEdit;" . $k .
"}}}}}",
$check, $a_output);
563 $lng = $DIC->language();
567 foreach ($classes as $k => $v) {
572 '<input type="checkbox" value="1"' .
573 ' name="target[' . $k .
']">' .
'</input> ' . $v;
575 $a_output = str_replace(
"{{{{{TableEdit;" . $k .
"}}}}}",
$check, $a_output);
589 $lng = $DIC->language();
593 foreach ($widths as $k => $v) {
595 '<input class="small" type="text" size="5" maxlength="10"' .
596 ' name="width[' . $k .
']" value="' . $v .
'">' .
'</input>';
598 $a_output = str_replace(
"{{{{{TableEdit;" . $k .
"}}}}}",
$check, $a_output);
612 $lng = $DIC->language();
616 foreach ($spans as $k => $v) {
618 $selects =
'<div style="white-space:nowrap;">' .
$lng->
txt(
"cont_colspan") .
": " .
619 '<select class="small" name="colspan[' . $k .
']">';
620 for ($i = 1; $i <= $v[
"max_x"] - $v[
"x"] + 1; $i++) {
621 $sel_str = ($i == $v[
"colspan"])
622 ?
'selected="selected"' 624 $selects .=
'<option value="' . $i .
'" ' . $sel_str .
'>' . $i .
'</option>';
626 $selects .=
"</select></div>";
629 $selects .=
'<div style="margin-top:3px; white-space:nowrap;">' .
$lng->
txt(
"cont_rowspan") .
": " .
630 '<select class="small" name="rowspan[' . $k .
']">';
631 for ($i = 1; $i <= $v[
"max_y"] - $v[
"y"] + 1; $i++) {
632 $sel_str = ($i == $v[
"rowspan"])
633 ?
'selected="selected"' 635 $selects .=
'<option value="' . $i .
'" ' . $sel_str .
'>' . $i .
'</option>';
637 $selects .=
"</select></div>";
639 $a_output = str_replace(
"{{{{{TableEdit;" . $k .
"}}}}}", $selects, $a_output);
654 $ilTabs->setSubTabActive(
"cont_style");
659 $form->
setTitle($this->
lng->txt(
"cont_table_cell_properties"));
663 $this->
lng->txt(
"cont_style"),
669 $options = array_merge(array(
"" => $this->
lng->txt(
"none")),
$chars);
670 foreach ($options as $k => $option) {
671 $html =
'<table border="0" cellspacing="0" cellpadding="0"><tr><td class="ilc_table_cell_' . $k .
'">' .
672 $option .
'</td></tr></table>';
673 $style->addOption($k, $option, $html);
684 $html .=
"<br />" . $this->renderTable(
"table_edit",
"style") .
"</form>";
698 $ilTabs->setSubTabActive(
"cont_width");
699 $ilTabs->setTabActive(
"cont_table_cell_properties");
701 $ctpl =
new ilTemplate(
"tpl.table_cell_properties.html",
true,
true,
"Services/COPage");
702 $ctpl->setVariable(
"BTN_NAME",
"setWidths");
703 $ctpl->setVariable(
"BTN_TEXT",
$lng->
txt(
"cont_save_widths"));
704 $ctpl->setVariable(
"FORMACTION", $ilCtrl->getFormAction($this));
706 $html = $ctpl->get();
707 $html .=
"<br />" . $this->renderTable(
"table_edit",
"width") .
"</form>";
721 $ilTabs->setSubTabActive(
"cont_span");
722 $ilTabs->setTabActive(
"cont_table_cell_properties");
724 $ctpl =
new ilTemplate(
"tpl.table_cell_properties.html",
true,
true,
"Services/COPage");
725 $ctpl->setVariable(
"BTN_NAME",
"setSpans");
726 $ctpl->setVariable(
"BTN_TEXT",
$lng->
txt(
"cont_save_spans"));
727 $ctpl->setVariable(
"FORMACTION", $ilCtrl->getFormAction($this));
729 $html = $ctpl->get();
730 $html .=
"<br />" . $this->renderTable(
"table_edit",
"span") .
"</form>";
741 $target = $this->request->getStringArray(
"target");
742 if (count($target)) {
743 foreach ($target as $k => $value) {
745 $cid = explode(
":", $k);
746 $this->content_obj->setTDClass(
748 $this->request->getString(
"style"),
754 $this->updated = $this->pg_obj->update();
755 $this->tpl->setOnScreenMessage(
'success',
$lng->
txt(
"msg_obj_modified"),
true);
756 $this->
ctrl->redirect($this,
"editCellStyle");
766 $widths = $this->request->getStringArray(
"width");
767 if (count($widths) > 0) {
768 foreach ($widths as $k => $width) {
769 $cid = explode(
":", $k);
770 $this->content_obj->setTDWidth(
777 $this->updated = $this->pg_obj->update();
778 $this->tpl->setOnScreenMessage(
'success',
$lng->
txt(
"msg_obj_modified"),
true);
779 $this->
ctrl->redirect($this,
"editCellWidth");
789 $colspans = $this->request->getStringArray(
"colspan");
790 $rowspans = $this->request->getStringArray(
"rowspan");
793 if (count($colspans) > 0) {
794 foreach ($colspans as $k => $span) {
796 $rs[$k] = $rowspans[$k];
798 $this->content_obj->setTDSpans($cs, $rs);
800 $this->updated = $this->pg_obj->update();
801 $this->tpl->setOnScreenMessage(
'success',
$lng->
txt(
"msg_obj_modified"),
true);
802 $this->
ctrl->redirect($this,
"editCellSpan");
811 $this->
form->checkInput();
814 $caption = $this->
form->getInput(
"caption");
815 $caption = str_replace(
"&",
"&", $caption);
816 $caption = str_replace(
"<",
"<", $caption);
817 $caption = str_replace(
">",
">", $caption);
819 $this->content_obj->setLanguage($this->
form->getInput(
"language"));
820 $this->content_obj->setWidth($this->
form->getInput(
"width"));
824 $this->content_obj->setHorizontalAlign($this->
form->getInput(
"align"));
825 $this->content_obj->setHeaderRows($this->
form->getInput(
"row_header"));
826 $this->content_obj->setHeaderCols($this->
form->getInput(
"col_header"));
827 $this->content_obj->setFooterRows($this->
form->getInput(
"row_footer"));
828 $this->content_obj->setFooterCols($this->
form->getInput(
"col_footer"));
829 if (strpos($this->
form->getInput(
"characteristic"),
":") > 0) {
830 $t = explode(
":", $this->
form->getInput(
"characteristic"));
831 $this->content_obj->setTemplate($t[2]);
832 $this->content_obj->setClass(
"");
834 $this->content_obj->setClass($this->
form->getInput(
"characteristic"));
835 $this->content_obj->setTemplate(
"");
837 $this->content_obj->setCaption(
839 $this->
form->getInput(
"cap_align")
849 $this->updated = $this->pg_obj->update();
850 if ($this->updated ===
true) {
851 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_obj_modified"),
true);
852 $this->
ctrl->redirect($this,
"editProperties");
854 $this->pg_obj->addHierIDs();
861 $this->content_obj->setHorizontalAlign(
"Right");
867 $this->content_obj->setHorizontalAlign(
"Left");
873 $this->content_obj->setHorizontalAlign(
"Center");
879 $this->content_obj->setHorizontalAlign(
"LeftFloat");
885 $this->content_obj->setHorizontalAlign(
"RightFloat");
895 $html = $this->
form->getHTML();
910 $this->content_obj->create($this->pg_obj, $this->hier_id, $this->pc_id);
913 $this->
form->checkInput();
915 $import_table = trim($this->
form->getInput(
"import_table"));
918 if (!empty($import_table)) {
919 switch ($this->
form->getInput(
"import_type")) {
924 $this->content_obj->importSpreadsheet($this->
form->getInput(
"language"), $import_table);
928 $this->content_obj->addRows(
929 $this->
form->getInput(
"nr_rows"),
930 $this->
form->getInput(
"nr_cols")
936 $frtype = $this->
form->getInput(
"first_row_style");
938 $this->content_obj->setFirstRowStyle($frtype);
941 $this->updated = $this->pg_obj->update();
943 if ($this->updated ===
true) {
952 $this->
ctrl->returnToParent($this,
"jump" . $this->hier_id);
970 $ilTabs->setSubTabActive(
"cont_alignment");
971 $ilTabs->setTabActive(
"cont_table_cell_properties");
976 $form->
setTitle($this->
lng->txt(
"cont_table_cell_properties"));
981 "Left" =>
$lng->
txt(
"cont_left"),
982 "Center" =>
$lng->
txt(
"cont_center"),
983 "Right" =>
$lng->
txt(
"cont_right")
995 $html .=
"<br />" . $this->renderTable(
"table_edit",
"alignment") .
"</form>";
1006 $targets = $this->request->getStringArray(
"target");
1007 if (count($targets) > 0) {
1008 foreach ($targets as $k => $value) {
1010 $cid = explode(
":", $k);
1011 $this->content_obj->setTDAlignment(
1013 $this->request->getString(
"alignment"),
1019 $this->updated = $this->pg_obj->update();
1020 $this->tpl->setOnScreenMessage(
'success',
$lng->
txt(
"msg_obj_modified"),
true);
1022 $this->
ctrl->redirect($this,
"editCellAlignment");
1036 $this->tpl->addJavaScript(
"./Services/UIComponent/AdvancedSelectionList/js/AdvancedSelectionList.js");
1037 $this->tpl->setContent($this->getEditDataTable(
true));
1040 public function getEditDataTable(
bool $initial =
false):
string 1047 $dtpl =
new ilTemplate(
"tpl.tabledata2.html",
true,
true,
"Services/COPage");
1048 $dtpl->setVariable(
"FORMACTION", $this->
ctrl->getFormAction($this,
"tableAction"));
1049 $dtpl->setVariable(
"HIERID", $this->hier_id);
1050 $dtpl->setVariable(
"PCID", $this->pc_id);
1051 $class = $pc_tab->getClass();
1052 if ($class ===
"") {
1053 $class =
"StandardTable";
1055 $template_classes = [];
1056 if ($this->
getStyleId() > 0 && $pc_tab->getTemplate() !=
"") {
1059 $template_classes = $style->getTemplateClasses(
$id);
1060 if ($template_classes[
"table"] !==
"") {
1061 $class = $template_classes[
"table"];
1064 $dtpl->setVariable(
"TABLE_CLASS",
"ilc_table" . $class);
1068 $ilCtrl->getFormAction($this,
"updateJS")
1074 $nodes = $this->dom_util->path($this->dom,
$path);
1076 $total_rows = count($nodes);
1077 foreach ($nodes as $node) {
1078 $path2 =
"//PageContent[@HierId='" . $this->
getHierId() .
"']" .
1079 "/Table/TableRow[$i+1]/TableData";
1080 $nodes2 = $this->dom_util->path($this->dom, $path2);
1083 $total_cols = count($nodes2);
1085 foreach ($nodes2 as $node2) {
1087 $dtpl->touchBlock(
"empty_td");
1090 $move_forward =
false;
1091 $move_backward =
false;
1093 if (count($nodes2) == 1) {
1096 $move_forward =
true;
1098 } elseif ($j == (count($nodes2) - 1)) {
1099 $move_backward =
true;
1101 $move_forward =
true;
1102 $move_backward =
true;
1104 $dtpl->setCurrentBlock(
"col_icon");
1105 $dtpl->setVariable(
"NR_COLUMN", $j + 1);
1106 $dtpl->setVariable(
"PCID_COLUMN", $node2->getAttribute(
"PCID"));
1108 $dtpl->parseCurrentBlock();
1111 $dtpl->setCurrentBlock(
"row");
1112 $dtpl->parseCurrentBlock();
1116 foreach ($nodes2 as $node2) {
1120 if (count($nodes) == 1) {
1121 $move_type =
"none";
1123 $move_type =
"forward";
1125 } elseif ($i == (count($nodes) - 1)) {
1126 $move_type =
"backward";
1128 $move_type =
"both";
1130 $dtpl->setCurrentBlock(
"row_icon");
1131 $dtpl->setVariable(
"NR_ROW", $i + 1);
1132 $dtpl->setVariable(
"PCID_ROW", $node2->getAttribute(
"PCID"));
1133 $dtpl->setVariable(
"ROW_CAPTION", $i + 1);
1134 $dtpl->parseCurrentBlock();
1138 if ($node2->getAttribute(
"Hidden") !=
"Y") {
1140 $dtpl->touchBlock(
"cell_type");
1145 $dtpl->setCurrentBlock(
"cell");
1147 $dtpl->setVariable(
"PAR_TA_NAME",
"cell[" . $i .
"][" . $j .
"]");
1148 $dtpl->setVariable(
"PAR_TA_ID",
"cell_" . $i .
"_" . $j);
1149 $dtpl->setVariable(
"PAR_ROW", (
string) $i);
1150 $dtpl->setVariable(
"PAR_COLUMN", (
string) $j);
1158 $dtpl->setVariable(
"CELL_TAG",
"td");
1161 $node_class = $node2->getAttribute(
"Class");
1162 $class = $this->getCellClass(
1170 if ($class !==
"") {
1171 $dtpl->setVariable(
"CELL_CLASS",
"ilc_table_cell_" . $class);
1179 $cs = $node2->getAttribute(
"ColSpan");
1180 $width = (
int) $node2->getAttribute(
"Width");
1181 $rs = $node2->getAttribute(
"RowSpan");
1183 $dtpl->setVariable(
"WIDTH", $width);
1185 $align = (string) $node2->getAttribute(
"HorizontalAlign");
1186 if ($align !==
"") {
1187 $dtpl->setVariable(
"ALIGN", $align);
1189 $dtpl->setVariable(
"HEIGHT",
"80");
1191 $dtpl->setVariable(
"COLSPAN",
'colspan="' . $cs .
'"');
1195 $dtpl->setVariable(
"ROWSPAN",
'rowspan="' . $rs .
'"');
1198 $dtpl->parseCurrentBlock();
1202 $dtpl->setCurrentBlock(
"row");
1203 $dtpl->parseCurrentBlock();
1206 $dtpl->setVariable(
"TXT_ACTION", $this->
lng->txt(
"cont_table"));
1209 $dtpl->setCurrentBlock(
"int_link_prep");
1213 $ilCtrl->getLinkTargetByClass(
1214 array(
"ilpageeditorgui",
"ilinternallinkgui"),
1222 $dtpl->parseCurrentBlock();
1224 $html = $dtpl->get();
1232 protected function getCellClass(
1236 array $template_classes,
1246 if (($template_classes[
"even_row"] ??
"") !==
"") {
1248 $class = $template_classes[
"even_row"];
1252 if (($template_classes[
"odd_row"] ??
"") !==
"") {
1254 $class = $template_classes[
"odd_row"];
1258 if (($template_classes[
"even_col"] ??
"") !==
"") {
1260 $class = $template_classes[
"even_col"];
1264 if (($template_classes[
"odd_col"] ??
"") !==
"") {
1266 $class = $template_classes[
"odd_col"];
1270 if (($template_classes[
"row_foot"] ??
"") !==
"") {
1271 if ($i + $pc_tab->getFooterRows() >= $total_rows) {
1272 $class = $template_classes[
"row_foot"];
1276 if (($template_classes[
"col_foot"] ??
"") !==
"") {
1277 if ($j + $pc_tab->getFooterCols() >= $total_cols) {
1278 $class = $template_classes[
"col_foot"];
1282 if (($template_classes[
"row_head"] ??
"") !==
"") {
1283 if ($i < $pc_tab->getHeaderRows()) {
1284 $class = $template_classes[
"row_head"];
1288 if (($template_classes[
"col_head"] ??
"") !==
"") {
1289 if ($j < $pc_tab->getHeaderCols()) {
1290 $class = $template_classes[
"col_head"];
1294 if ($class ===
"") {
1295 if ($i < $pc_tab->getHeaderRows()) {
1296 $class =
"StandardHeader";
1300 if ($class ===
"") {
1301 $class =
"StandardCell1";
1305 if ($node_class !==
"") {
1306 $class = $node_class;
1316 $chr = ($nr - 1) % $base;
1317 $cap = chr($chr + 65) . $cap;
1318 $nr = ($nr - 1 - $chr) / $base;
1325 $tab_node = $this->content_obj->getDomNode();
1330 foreach ($tab_node->firstChild->childNodes as $child) {
1333 foreach ($child->childNodes as $child2) {
1335 foreach ($child2->childNodes as $cell_content_node) {
1336 $content .= $this->dom_util->dump($cell_content_node);
1344 $trans = $this->pg_obj->getLanguageVariablesXML();
1345 $mobs = $this->pg_obj->getMultimediaXML();
1353 $content = $content . $mobs . $trans . $template_xml;
1357 !$this->pg_obj->getPageConfig()->getPreventHTMLUnmasking(),
1372 $ilUser = $DIC->user();
1373 $content =
"<dummy>" . $content .
"</dummy>";
1377 $params = array(
'webspace_path' => $wb_path,
'enlarge_path' => $enlarge_path);
1378 $output = $this->xsl->process($content,
$params);
1382 $output = str_replace(
"<",
"<", $output);
1383 $output = str_replace(
">",
">", $output);
1384 $output = str_replace(
"&",
"&", $output);
1388 if (isset($page_object)) {
1389 $defs = $this->pc_definition->getPCDefinitions();
1390 foreach ($defs as $def) {
1391 $pc_class = $def[
"pc_class"];
1392 $pc_obj =
new $pc_class($page_object);
1395 $output = $pc_obj->modifyPageContentPostXsl((
string) $output,
"presentation",
false);
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()
ILIAS COPage PC PCDefinition $pc_definition
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 _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
Content object of ilPageObject (see ILIAS DTD).
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")
static getBaseContentStylePath()
ilGlobalTemplateInterface $tpl
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ILIAS COPage Dom DomUtil $dom_util
getColumnCaption(int $nr)
getEditorScriptTag(string $form_pc_id="", string $form_cname="")
getAllCellWidths()
Get all cell widths.
saveProperties()
save table properties in db and return to page edit screen
form( $class_path, string $cmd, string $submit_caption="")
getAllCellSpans()
Get all cell spans.
setTabs(string $data_tab_txt_key="")
getTemplateOptions(string $a_type="")
This class represents a text area property in a property form.
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
ILIAS COPage Xsl XslManager $xsl
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)