Public Member Functions | |
ilPCList (&$a_dom) | |
Constructor public. | |
setNode (&$a_node) | |
create (&$a_pg_obj, $a_hier_id) | |
addItems ($a_nr) | |
setOrderType ($a_type="Unordered") | |
Data Fields | |
$dom | |
$list_node |
Definition at line 36 of file class.ilPCList.php.
ilPCList::addItems | ( | $ | a_nr | ) |
Definition at line 69 of file class.ilPCList.php.
{ for ($i=1; $i<=$a_nr; $i++) { $new_item =& $this->dom->create_element("ListItem"); $new_item =& $this->list_node->append_child($new_item); } }
ilPCList::create | ( | &$ | a_pg_obj, | |
$ | a_hier_id | |||
) |
Definition at line 60 of file class.ilPCList.php.
{ //echo "::".is_object($this->dom).":"; $this->node =& $this->dom->create_element("PageContent"); $a_pg_obj->insertContent($this, $a_hier_id, IL_INSERT_AFTER); $this->list_node =& $this->dom->create_element("List"); $this->list_node =& $this->node->append_child($this->list_node); }
ilPCList::ilPCList | ( | &$ | a_dom | ) |
Constructor public.
Definition at line 46 of file class.ilPCList.php.
References ilPageContent::ilPageContent(), and ilPageContent::setType().
{ parent::ilPageContent(); $this->setType("list"); $this->dom =& $a_dom; }
ilPCList::setNode | ( | &$ | a_node | ) |
Reimplemented from ilPageContent.
Definition at line 54 of file class.ilPCList.php.
{ parent::setNode($a_node); // this is the PageContent node $this->list_node =& $a_node->first_child(); // this is the Table node }
ilPCList::setOrderType | ( | $ | a_type = "Unordered" |
) |
Definition at line 78 of file class.ilPCList.php.
{ switch ($a_type) { case "Unordered": $this->list_node->set_attribute("Type", "Unordered"); if ($this->list_node->has_attribute("NumberingType")) { $this->list_node->remove_attribute("NumberingType"); } break; case "Number": $this->list_node->set_attribute("Type", "Ordered"); $this->list_node->set_attribute("NumberingType", "Number"); break; case "Roman": $this->list_node->set_attribute("Type", "Ordered"); $this->list_node->set_attribute("NumberingType", "Roman"); break; case "roman": $this->list_node->set_attribute("Type", "Ordered"); $this->list_node->set_attribute("NumberingType", "roman"); break; case "Alphabetic": $this->list_node->set_attribute("Type", "Ordered"); $this->list_node->set_attribute("NumberingType", "Alphabetic"); break; case "alphabetic": $this->list_node->set_attribute("Type", "Ordered"); $this->list_node->set_attribute("NumberingType", "alphabetic"); break; } }
ilPCList::$dom |
Definition at line 38 of file class.ilPCList.php.
ilPCList::$list_node |
Definition at line 39 of file class.ilPCList.php.