ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
class.ilPCTable.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 1998-2010 ILIAS open source, Extended GPL, see docs/LICENSE */
4
5require_once("./Services/COPage/classes/class.ilPageContent.php");
6
18{
19 public $dom;
20 public $tab_node;
21
22
26 public function init()
27 {
28 $this->setType("tab");
29 }
30
31 public function setNode($a_node)
32 {
33 parent::setNode($a_node); // this is the PageContent node
34 $this->tab_node = $a_node->first_child(); // this is the Table node
35 }
36
37 public function create(&$a_pg_obj, $a_hier_id, $a_pc_id = "")
38 {
39 $this->node = $this->createPageContentNode();
40 $a_pg_obj->insertContent($this, $a_hier_id, IL_INSERT_AFTER, $a_pc_id);
41 $this->tab_node = $this->dom->create_element("Table");
42 $this->tab_node = $this->node->append_child($this->tab_node);
43 $this->tab_node->set_attribute("Language", "");
44 }
45
46 public function &addRow()
47 {
48 $new_tr = $this->dom->create_element("TableRow");
49 $new_tr = &$this->tab_node->append_child($new_tr);
50 return $new_tr;
51 }
52
53 public function &addCell(&$aRow, $a_data = "", $a_lang = "")
54 {
55 $new_td = $this->dom->create_element("TableData");
56 $new_td = $aRow->append_child($new_td);
57
58 // insert data if given
59 if ($a_data != "") {
60 $new_pg = $this->createPageContentNode(false);
61 $new_par = $this->dom->create_element("Paragraph");
62 $new_par = $new_pg->append_child($new_par);
63 $new_par->set_attribute("Language", $a_lang);
64 $new_par->set_attribute("Characteristic", "TableContent");
65 $new_par->set_content($a_data);
66 $new_td->append_child($new_pg);
67 }
68
69 return $new_td;
70 }
71
75 public function addRows($a_nr_rows, $a_nr_cols)
76 {
77 for ($i=1; $i<=$a_nr_rows; $i++) {
78 $aRow = $this->addRow();
79 for ($j=1; $j<=$a_nr_cols; $j++) {
80 $this->addCell($aRow);
81 }
82 }
83 }
84
88 public function importSpreadsheet($a_lang, $a_data)
89 {
90 str_replace($a_data, "\r", "\n");
91 str_replace($a_data, "\n\n", "\n");
92 $target_rows = array();
93 $rows = explode("\n", $a_data);
94
95 // get maximum of cols in a row and
96 // put data in target_row arrays
97 foreach ($rows as $row) {
98 $cells = explode("\t", $row);
99 $max_cols = ($max_cols > count($cells))
100 ? $max_cols
101 : count($cells);
102 $target_rows[] = $cells;
103 }
104
105 // iterate target row arrays and insert data
106 foreach ($target_rows as $row) {
107 $aRow = $this->addRow();
108 for ($j=0; $j<$max_cols; $j++) {
109 // mask html
110 $data = str_replace("&", "&amp;", $row[$j]);
111 $data = str_replace("<", "&lt;", $data);
112 $data = str_replace(">", "&gt;", $data);
113
114 $this->addCell($aRow, $data, $a_lang);
115 }
116 }
117 }
118
122 public function getLanguage()
123 {
124 return $this->getTableAttribute("Language");
125 }
126
132 public function setLanguage($a_lang)
133 {
134 if ($a_lang != "") {
135 $this->setTableAttribute("Language", $a_lang);
136 }
137 }
138
142 public function getWidth()
143 {
144 return $this->getTableAttribute("Width");
145 }
146
152 public function setWidth($a_width)
153 {
154 $this->setTableAttribute("Width", $a_width);
155 }
156
160 public function getBorder()
161 {
162 return $this->getTableAttribute("Border");
163 }
164
170 public function setBorder($a_border)
171 {
172 $this->setTableAttribute("Border", $a_border);
173 }
174
178 public function getCellSpacing()
179 {
180 return $this->getTableAttribute("CellSpacing");
181 }
182
188 public function setCellSpacing($a_spacing)
189 {
190 $this->setTableAttribute("CellSpacing", $a_spacing);
191 }
192
196 public function getCellPadding()
197 {
198 return $this->getTableAttribute("CellPadding");
199 }
200
206 public function setCellPadding($a_padding)
207 {
208 $this->setTableAttribute("CellPadding", $a_padding);
209 }
210
214 public function setHorizontalAlign($a_halign)
215 {
216 $this->tab_node->set_attribute("HorizontalAlign", $a_halign);
217 }
218
222 public function getHorizontalAlign()
223 {
224 return $this->getTableAttribute("HorizontalAlign");
225 }
226
230 public function setTDWidth($a_hier_id, $a_width, $a_pc_id = "")
231 {
232 $xpc = xpath_new_context($this->dom);
233
234 if ($a_pc_id == "") {
235 $path = "//TableData[@HierId = '" . $a_hier_id . "']";
236 } else {
237 $path = "//TableData[@PCID = '" . $a_pc_id . "']";
238 }
239 $res = xpath_eval($xpc, $path);
240
241 if (count($res->nodeset) == 1) {
242 if ($a_width != "") {
243 $res->nodeset[0]->set_attribute("Width", $a_width);
244 } else {
245 if ($res->nodeset[0]->has_attribute("Width")) {
246 $res->nodeset[0]->remove_attribute("Width");
247 }
248 }
249 }
250 }
251
255 public function setTDSpans($a_colspans, $a_rowspans)
256 {
257 $y = 0;
258 $rows = $this->tab_node->child_nodes();
259 foreach ($rows as $row) {
260 if ($row->node_name() == "TableRow") {
261 $x = 0;
262 $cells = $row->child_nodes();
263 foreach ($cells as $cell) {
264 if ($cell->node_name() == "TableData") {
265 $ckey = $cell->get_attribute("HierId") . ":" . $cell->get_attribute("PCID");
266 if ((int) $a_colspans[$ckey] > 1) {
267 $cell->set_attribute("ColSpan", (int) $a_colspans[$ckey]);
268 } else {
269 if ($cell->has_attribute("ColSpan")) {
270 $cell->remove_attribute("ColSpan");
271 }
272 }
273 if ((int) $a_rowspans[$ckey] > 1) {
274 $cell->set_attribute("RowSpan", (int) $a_rowspans[$ckey]);
275 } else {
276 if ($cell->has_attribute("RowSpan")) {
277 $cell->remove_attribute("RowSpan");
278 }
279 }
280 }
281 $x++;
282 }
283 $y++;
284 }
285 }
286 $this->fixHideAndSpans();
287 }
288
294 public function fixHideAndSpans()
295 {
296
297 // first: get max x and y
298 $max_x = $max_y = 0;
299 $y = 0;
300 $rows = $this->tab_node->child_nodes();
301
302 foreach ($rows as $row) {
303 if ($row->node_name() == "TableRow") {
304 $x = 0;
305 $cells = $row->child_nodes();
306 foreach ($cells as $cell) {
307 if ($cell->node_name() == "TableData") {
308 $max_x = max($max_x, $x);
309 $max_y = max($max_y, $y);
310 }
311 $x++;
312 }
313 $y++;
314 }
315 }
316
317 // second: fix hidden/colspans for all cells
318 $y = 0;
319 $rows = $this->tab_node->child_nodes();
320 foreach ($rows as $row) {
321 if ($row->node_name() == "TableRow") {
322 $x = 0;
323 $cells = $row->child_nodes();
324 foreach ($cells as $cell) {
325 if ($cell->node_name() == "TableData") {
326 $cspan = max(1, (int) $cell->get_attribute("ColSpan"));
327 $rspan = max(1, (int) $cell->get_attribute("RowSpan"));
328
329 // if col or rowspan is to high: reduce it to the max
330 if ($cspan > $max_x - $x + 1) {
331 $cell->set_attribute("ColSpan", $max_x - $x + 1);
332 $cspan = $max_x - $x + 1;
333 }
334 if ($rspan > $max_y - $y + 1) {
335 $cell->set_attribute("RowSpan", $max_y - $y + 1);
336 $rspan = $max_y - $y + 1;
337 }
338
339 // check hidden status
340 if ($this->checkCellHidden($colspans, $rowspans, $x, $y)) {
341 // hidden: set hidden flag, remove col and rowspan
342 $cell->set_attribute("Hidden", "Y");
343 $cspan = 1;
344 $rspan = 1;
345 if ($cell->has_attribute("ColSpan")) {
346 $cell->remove_attribute("ColSpan");
347 }
348 if ($cell->has_attribute("RowSpan")) {
349 $cell->remove_attribute("RowSpan");
350 }
351 $this->makeEmptyCell($cell);
352 } else {
353 // not hidden: remove hidden flag if existing
354 if ($cell->has_attribute("Hidden")) {
355 $cell->remove_attribute("Hidden");
356 }
357 }
358
359 $colspans[$x][$y] = $cspan;
360 $rowspans[$x][$y] = $rspan;
361 }
362 $x++;
363 }
364 $y++;
365 }
366 }
367 }
368
369
373 public function makeEmptyCell($td_node)
374 {
375 // delete children of paragraph node
376 $children = $td_node->child_nodes();
377 for ($i=0; $i<count($children); $i++) {
378 $td_node->remove_child($children[$i]);
379 }
380 }
381
385 public function checkCellHidden($colspans, $rowspans, $x, $y)
386 {
387 for ($i = 0; $i<=$x; $i++) {
388 for ($j = 0; $j<=$y; $j++) {
389 if ($i != $x || $j != $y) {
390 if ((($i + $colspans[$i][$j] > $x) &&
391 ($j + $rowspans[$i][$j] > $y))) {
392 return true;
393 }
394 }
395 }
396 }
397 return false;
398 }
399
405 public function getAllCellClasses()
406 {
407 $classes = array();
408 $rows = $this->tab_node->child_nodes();
409 foreach ($rows as $row) {
410 if ($row->node_name() == "TableRow") {
411 $cells = $row->child_nodes();
412 foreach ($cells as $cell) {
413 if ($cell->node_name() == "TableData") {
414 $classes[$cell->get_attribute("HierId") . ":" . $cell->get_attribute("PCID")]
415 = $cell->get_attribute("Class");
416 }
417 }
418 }
419 }
420
421 return $classes;
422 }
423
429 public function getAllCellAlignments()
430 {
431 $classes = array();
432 $rows = $this->tab_node->child_nodes();
433 foreach ($rows as $row) {
434 if ($row->node_name() == "TableRow") {
435 $cells = $row->child_nodes();
436 foreach ($cells as $cell) {
437 if ($cell->node_name() == "TableData") {
438 $classes[$cell->get_attribute("HierId") . ":" . $cell->get_attribute("PCID")]
439 = $cell->get_attribute("HorizontalAlign");
440 }
441 }
442 }
443 }
444
445 return $classes;
446 }
447
453 public function getAllCellSpans()
454 {
455 $spans = array();
456 $rows = $this->tab_node->child_nodes();
457 $y = 0;
458 $max_x = 0;
459 $max_y = 0;
460 foreach ($rows as $row) {
461 if ($row->node_name() == "TableRow") {
462 $x = 0;
463 $cells = $row->child_nodes();
464 foreach ($cells as $cell) {
465 if ($cell->node_name() == "TableData") {
466 $spans[$cell->get_attribute("HierId") . ":" . $cell->get_attribute("PCID")]
467 = array("x" => $x, "y" => $y, "colspan" => $cell->get_attribute("ColSpan"),
468 "rowspan" => $cell->get_attribute("RowSpan"));
469 $max_x = max($max_x, $x);
470 $max_y = max($max_y, $y);
471 }
472 $x++;
473 }
474 $y++;
475 }
476 }
477 foreach ($spans as $k => $v) {
478 $spans[$k]["max_x"] = $max_x;
479 $spans[$k]["max_y"] = $max_y;
480 }
481
482 return $spans;
483 }
484
490 public function getAllCellWidths()
491 {
492 $widths = array();
493 $rows = $this->tab_node->child_nodes();
494 foreach ($rows as $row) {
495 if ($row->node_name() == "TableRow") {
496 $cells = $row->child_nodes();
497 foreach ($cells as $cell) {
498 if ($cell->node_name() == "TableData") {
499 $widths[$cell->get_attribute("HierId") . ":" . $cell->get_attribute("PCID")]
500 = $cell->get_attribute("Width");
501 }
502 }
503 }
504 }
505
506 return $widths;
507 }
508
512 public function setTDClass($a_hier_id, $a_class, $a_pc_id = "")
513 {
514 $xpc = xpath_new_context($this->dom);
515 if ($a_pc_id == "") {
516 $path = "//TableData[@HierId = '" . $a_hier_id . "']";
517 } else {
518 $path = "//TableData[@PCID = '" . $a_pc_id . "']";
519 }
520 $res = xpath_eval($xpc, $path);
521 if (count($res->nodeset) == 1) {
522 if ($a_class != "") {
523 $res->nodeset[0]->set_attribute("Class", $a_class);
524 } else {
525 if ($res->nodeset[0]->has_attribute("Class")) {
526 $res->nodeset[0]->remove_attribute("Class");
527 }
528 }
529 }
530 }
531
535 public function setTDAlignment($a_hier_id, $a_class, $a_pc_id = "")
536 {
537 $xpc = xpath_new_context($this->dom);
538 if ($a_pc_id == "") {
539 $path = "//TableData[@HierId = '" . $a_hier_id . "']";
540 } else {
541 $path = "//TableData[@PCID = '" . $a_pc_id . "']";
542 }
543 $res = xpath_eval($xpc, $path);
544 if (count($res->nodeset) == 1) {
545 if ($a_class != "") {
546 $res->nodeset[0]->set_attribute("HorizontalAlign", $a_class);
547 } else {
548 if ($res->nodeset[0]->has_attribute("HorizontalAlign")) {
549 $res->nodeset[0]->remove_attribute("HorizontalAlign");
550 }
551 }
552 }
553 }
554
558 public function getCaption()
559 {
560 $hier_id = $this->getHierId();
561 if (!empty($hier_id)) {
562 $xpc = xpath_new_context($this->dom);
563 $path = "//PageContent[@HierId = '" . $hier_id . "']/Table/Caption";
564 $res = xpath_eval($xpc, $path);
565
566 if (count($res->nodeset) == 1) {
567 return $res->nodeset[0]->get_content();
568 }
569 }
570 }
571
575 public function getCaptionAlign()
576 {
577 $hier_id = $this->getHierId();
578 if (!empty($hier_id)) {
579 $xpc = xpath_new_context($this->dom);
580 $path = "//PageContent[@HierId = '" . $hier_id . "']/Table/Caption";
581 $res = xpath_eval($xpc, $path);
582 if (count($res->nodeset) == 1) {
583 return $res->nodeset[0]->get_attribute("Align");
584 }
585 }
586 }
587
591 public function setCaption($a_content, $a_align)
592 {
593 if ($a_content != "") {
595 $this->dom,
596 $this->tab_node,
597 "Caption",
598 array("Summary", "TableRow"),
600 array("Align" => $a_align)
601 );
602 } else {
603 ilDOMUtil::deleteAllChildsByName($this->tab_node, array("Caption"));
604 }
605 }
606
607
608 public function importTableAttributes(&$node)
609 {
610 /*echo "importing table attributes";
611 var_dump($tableNode);*/
612 if ($node->has_attributes()) {
613 foreach ($node->attributes() as $n) {
614 switch (strtolower($n->node_name())) {
615 case "border":
616 $this->setBorder($this->extractText($n));
617 break;
618 case "align":
619 $this->setHorizontalAlign(ucfirst(strtolower($this->extractText($n))));
620 break;
621 case "cellspacing":
622 $this->setCellSpacing($this->extractText($n));
623 break;
624 case "cellpadding":
625 $this->setCellPadding($this->extractText($n));
626 break;
627 case "width":
628 $this->setWidth($this->extractText($n));
629 break;
630
631 }
632 }
633 }
634 }
635
636
637 public function importCellAttributes(&$node, &$par)
638 {
639 /*echo "importing table attributes";
640 var_dump($tableNode);*/
641 if ($node->has_attributes()) {
642 foreach ($node->attributes() as $n) {
643 switch (strtolower($n->node_name())) {
644 case "class":
645 $par->set_attribute("Class", $this->extractText($n));
646 break;
647 case "width":
648 $par->set_attribute("Width", $this->extractText($n));
649 break;
650 }
651 }
652 }
653 }
654
655
656 public function importRow($lng, &$node)
657 {
658 /*echo "add Row";
659 var_dump($node);*/
660
661 $aRow = $this->addRow();
662
663 if ($node->has_child_nodes()) {
664 foreach ($node->child_nodes() as $n) {
665 if ($n->node_type() == XML_ELEMENT_NODE &&
666 strcasecmp($n->node_name(), "td") == 0) {
667 $this->importCell($lng, $n, $aRow);
668 }
669 }
670 }
671 }
672
673 public function importCell($lng, &$cellNode, &$aRow)
674 {
675 /*echo "add Cell";
676 var_dump($cellNode);*/
677 $aCell = $this->addCell($aRow);
678 $par = new ilPCParagraph($this->getPage());
679 $par->createAtNode($aCell);
680 $par->setText($par->input2xml($this->extractText($cellNode)));
681 $par->setCharacteristic("TableContent");
682 $par->setLanguage($lng);
683 $this->importCellAttributes($cellNode, $aCell);
684 }
685
686 public function extractText(&$node)
687 {
688 $owner_document = $node->owner_document();
689 $children = $node->child_nodes();
690 $total_children = count($children);
691 for ($i = 0; $i < $total_children; $i++) {
692 $cur_child_node = $children[$i];
693 $output .= $owner_document->dump_node($cur_child_node);
694 }
695 return $output;
696 }
697
698 public function importHtml($lng, $htmlTable)
699 {
700 $dummy = ilUtil::stripSlashes($htmlTable, false);
701 //echo htmlentities($dummy);
703
704 if ($dom) {
705 $xpc = @xpath_new_context($dom);
706 // extract first table object
707 $path = "//table[1] | //Table[1]";
708 $res = @xpath_eval($xpc, $path);
709
710 if (count($res->nodeset) == 0) {
711 $error = "Could not find a table root node";
712 }
713
714 if (empty($error)) {
715 for ($i = 0; $i < count($res->nodeset); $i++) {
716 $node = $res->nodeset[$i];
717
719
720 if ($node->has_child_nodes()) {
721 foreach ($node->child_nodes() as $n) {
722 if ($n->node_type() == XML_ELEMENT_NODE &&
723 strcasecmp($n->node_name(), "tr") == 0) {
724 $this->importRow($lng, $n);
725 }
726 }
727 }
728 }
729 }
730 $dom->free();
731 }
732 if (is_array($error)) {
733 $errmsg = "";
734 foreach ($error as $errorline) { # Loop through all errors
735 $errmsg .= "[" . $errorline['line'] . ", " . $errorline['col'] . "]: " . $errorline['errormessage'] . " at Node '" . $errorline['nodename'] . "'<br />";
736 }
737 } else {
738 $errmsg = $error;
739 }
740
741 if (empty($errmsg)) {
742 return true;
743 }
744
745 $_SESSION["message"] = $errmsg;
746 return false;
747 }
748
752 public function setFirstRowStyle($a_class)
753 {
754 $childs = $this->tab_node->child_nodes();
755 foreach ($childs as $child) {
756 if ($child->node_name() == "TableRow") {
757 $gchilds = $child->child_nodes();
758 foreach ($gchilds as $gchild) {
759 if ($gchild->node_name() == "TableData") {
760 $gchild->set_attribute("Class", $a_class);
761 }
762 }
763 return;
764 }
765 }
766 }
767
773 public function setClass($a_class)
774 {
775 $this->setTableAttribute("Class", $a_class);
776 }
777
783 public function getClass()
784 {
785 return $this->getTableAttribute("Class");
786 }
787
793 public function setTemplate($a_template)
794 {
795 $this->setTableAttribute("Template", $a_template);
796 }
797
803 public function getTemplate()
804 {
805 return $this->getTableAttribute("Template");
806 }
807
813 public function setHeaderRows($a_nr)
814 {
815 $this->setTableAttribute("HeaderRows", $a_nr);
816 }
817
823 public function getHeaderRows()
824 {
825 return $this->getTableAttribute("HeaderRows");
826 }
827
833 public function setFooterRows($a_nr)
834 {
835 $this->setTableAttribute("FooterRows", $a_nr);
836 }
837
843 public function getFooterRows()
844 {
845 return $this->getTableAttribute("FooterRows");
846 }
847
853 public function setHeaderCols($a_nr)
854 {
855 $this->setTableAttribute("HeaderCols", $a_nr);
856 }
857
863 public function getHeaderCols()
864 {
865 return $this->getTableAttribute("HeaderCols");
866 }
867
873 public function setFooterCols($a_nr)
874 {
875 $this->setTableAttribute("FooterCols", $a_nr);
876 }
877
883 public function getFooterCols()
884 {
885 return $this->getTableAttribute("FooterCols");
886 }
887
894 protected function setTableAttribute($a_attr, $a_value)
895 {
896 if (!empty($a_value)) {
897 $this->tab_node->set_attribute($a_attr, $a_value);
898 } else {
899 if ($this->tab_node->has_attribute($a_attr)) {
900 $this->tab_node->remove_attribute($a_attr);
901 }
902 }
903 }
904
910 public function getTableAttribute($a_attr)
911 {
912 if (is_object($this->tab_node)) {
913 return $this->tab_node->get_attribute($a_attr);
914 }
915 }
916
921 public static function getLangVars()
922 {
923 return array("ed_insert_dtable", "ed_insert_atable","ed_new_row_after", "ed_new_row_before",
924 "ed_new_col_after", "ed_new_col_before", "ed_delete_col",
925 "ed_delete_row", "ed_edit_data", "ed_row_up", "ed_row_down",
926 "ed_col_left", "ed_col_right");
927 }
928
929
936 public static function handleCopiedContent(DOMDocument $a_domdoc, $a_self_ass = true, $a_clone_mobs = false)
937 {
938 $xpath = new DOMXPath($a_domdoc);
939 $nodes = $xpath->query("//Table");
940 foreach ($nodes as $node) {
941 $node->removeAttribute("Id");
942 }
943 }
944}
$n
Definition: RandomTest.php:85
$_SESSION["AccountId"]
An exception for terminatinating execution or to throw for unit testing.
const IL_INSERT_AFTER
static setFirstOptionalElement( $doc, $parent_node, $a_node_name, $a_successors, $a_content, $a_attributes, $a_remove_childs=true)
searches for an element $a_node_name within the childs of $parent_node if no node is found,...
static deleteAllChildsByName($a_parent, $a_node_names)
delete all childs of a node by names in $a_node_names
Class ilPCParagraph.
Class ilPCTable.
getHeaderCols()
Get header cols.
setCellPadding($a_padding)
set table cell padding
setFirstRowStyle($a_class)
Set first row td style.
setFooterCols($a_nr)
Set footer cols.
setTDSpans($a_colspans, $a_rowspans)
Set TDSpans.
& addCell(&$aRow, $a_data="", $a_lang="")
checkCellHidden($colspans, $rowspans, $x, $y)
Check hidden status.
setHeaderCols($a_nr)
Set header cols.
setFooterRows($a_nr)
Set footer rows.
getCellPadding()
get table cell padding
getFooterRows()
Get footer rows.
addRows($a_nr_rows, $a_nr_cols)
add rows to table
static handleCopiedContent(DOMDocument $a_domdoc, $a_self_ass=true, $a_clone_mobs=false)
Handle copied content.
getWidth()
get table width
importRow($lng, &$node)
importTableAttributes(&$node)
extractText(&$node)
setHorizontalAlign($a_halign)
set horizontal align
static getLangVars()
Get lang vars needed for editing.
getAllCellAlignments()
Get all cell alignments.
setTableAttribute($a_attr, $a_value)
Set attribute of table tag.
makeEmptyCell($td_node)
Make cell empty.
getHeaderRows()
Get header rows.
setWidth($a_width)
set table width
setTemplate($a_template)
Set template.
setTDClass($a_hier_id, $a_class, $a_pc_id="")
set class of table data cell
create(&$a_pg_obj, $a_hier_id, $a_pc_id="")
setLanguage($a_lang)
set table language
importSpreadsheet($a_lang, $a_data)
import from table
setTDAlignment($a_hier_id, $a_class, $a_pc_id="")
set alignment of table data cell
setBorder($a_border)
set table border
getFooterCols()
Get footer cols.
setClass($a_class)
Set Style Class of table.
setCaption($a_content, $a_align)
set table caption
importCell($lng, &$cellNode, &$aRow)
getTableAttribute($a_attr)
Get table tag attribute.
importHtml($lng, $htmlTable)
getBorder()
get table border width
getTemplate()
Get template.
getHorizontalAlign()
get table cell padding
fixHideAndSpans()
Fix Hide and Spans.
getAllCellClasses()
Get all cell classes.
setCellSpacing($a_spacing)
set table cell spacing
getCaption()
get caption
importCellAttributes(&$node, &$par)
getAllCellSpans()
Get all cell spans.
init()
Init page content component.
getCaptionAlign()
get caption alignment (Top | Bottom)
getAllCellWidths()
Get all cell widhts.
setNode($a_node)
Set xml node of page content.
setTDWidth($a_hier_id, $a_width, $a_pc_id="")
set width of table data cell
getClass()
Get characteristic of section.
getLanguage()
get table language
getCellSpacing()
get table cell spacing
setHeaderRows($a_nr)
Set header rows.
Class ilPageContent.
createPageContentNode($a_set_this_node=true)
Create page content node (always use this method first when adding a new element)
getHierId()
Get hierarchical id.
setType($a_type)
Set Type.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
$i
Definition: disco.tpl.php:19
$y
Definition: example_007.php:83
$x
Definition: example_009.php:98
if(!is_dir( $entity_dir)) exit("Fatal Error ([A-Za-z0-9]+)\s+" &#(? foreach( $entity_files as $file) $output
xpath_eval($xpath_context, $eval_str, $contextnode=null)
domxml_open_mem($str, $mode=0, &$error=null)
xpath_new_context($dom_document)
const DOMXML_LOAD_PARSING
$error
Definition: Error.php:17
global $lng
Definition: privfeed.php:17
foreach($_POST as $key=> $value) $res
$a_content
Definition: workflow.php:93
$rows
Definition: xhr_table.php:10