29 public function init(): void
36 parent::setNode($a_node);
47 $this->tab_node = $this->dom->create_element(
"Table");
48 $this->tab_node = $this->node->append_child($this->tab_node);
49 $this->tab_node->set_attribute(
"Language",
"");
50 $this->tab_node->set_attribute(
"DataTable",
"y");
61 for (
$i = 0;
$i < count($children);
$i++) {
68 $par_node = $this->dom->create_element(
"Paragraph");
69 $par_node = $pc_node->append_child($par_node);
70 $par_node->set_attribute(
"Characteristic",
"TableContent");
71 $par_node->set_attribute(
84 if (is_array($a_data)) {
85 foreach ($a_data as
$i => $row) {
87 foreach ($row as $j => $cell) {
89 '<?xml version="1.0" encoding="UTF-8"?><Paragraph>' . $cell .
'</Paragraph>',
96 if (empty($error) && is_object($par_node)) {
98 $children = $par_node->child_nodes();
99 for ($k = 0; $k < count($children); $k++) {
100 $par_node->remove_child($children[$k]);
105 $path =
"//Paragraph";
108 if (count(
$res->nodeset) == 1) {
109 $new_par_node =
$res->nodeset[0];
110 $new_childs = $new_par_node->child_nodes();
111 for ($l = 0; $l < count($new_childs); $l++) {
112 $cloned_child = $new_childs[$l]->clone_node(
true);
113 $par_node->append_child($cloned_child);
117 if (!empty($error)) {
xpath_eval(php4DOMXPath $xpath_context, string $eval_str, $contextnode=null)
setType(string $a_type)
Set Type.
setNode(php4DOMElement $a_node)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
create(ilPageObject $a_pg_obj, string $a_hier_id, string $a_pc_id="")
getCellNode(int $i, int $j, bool $create_if_not_exists=false)
Get cell paragraph node of row $i and cell $j.
xpath_new_context($dom_document)
domxml_open_mem($str, $mode=0, &$error=null)
insertContent(ilPageContent $a_cont_obj, string $a_pos, int $a_mode=IL_INSERT_AFTER, string $a_pcid="", bool $remove_placeholder=true)
insert a content node before/after a sibling or as first child of a parent
Class ilPageObject Handles PageObjects of ILIAS Learning Modules (see ILIAS DTD)
createPageContentNode(bool $a_set_this_node=true)
Create page content node (always use this method first when adding a new element) ...
setData(array $a_data)
Set data of cells.
const DOMXML_LOAD_PARSING
makeEmptyCell(php4DOMElement $td_node)
Make cell empty.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...