28 public function init(): void
46 for ($i = 1; $i <= $a_nr; $i++) {
47 $new_item = $this->dom_doc->createElement(
"ListItem");
48 $new_item = $this->getChildNode()->appendChild($new_item);
58 if ($this->getChildNode()->getAttribute(
"Type") ==
"Unordered") {
62 $nt = $this->getChildNode()->getAttribute(
"NumberingType");
79 if ($this->getChildNode()->getAttribute(
"Type") ==
"Unordered") {
87 $this->getChildNode()->setAttribute(
"Type", $a_val);
95 $nt = $this->getChildNode()->getAttribute(
"NumberingType");
113 $this->getChildNode()->setAttribute(
"NumberingType", $a_val);
115 if ($this->getChildNode()->hasAttribute(
"NumberingType")) {
116 $this->getChildNode()->removeAttribute(
"NumberingType");
124 $this->getChildNode()->setAttribute(
"StartValue", $a_val);
126 if ($this->getChildNode()->hasAttribute(
"StartValue")) {
127 $this->getChildNode()->removeAttribute(
"StartValue");
134 return (
int) $this->getChildNode()->getAttribute(
"StartValue");
139 if (!in_array($a_val, array(
"",
"BulletedList",
"NumberedList"))) {
140 $this->getChildNode()->setAttribute(
"Class", $a_val);
142 if ($this->getChildNode()->hasAttribute(
"Class")) {
143 $this->getChildNode()->removeAttribute(
"Class");
150 if (!in_array($a_val, array(
"",
"StandardListItem"))) {
151 $this->getChildNode()->setAttribute(
"ItemClass", $a_val);
153 if ($this->getChildNode()->hasAttribute(
"ItemClass")) {
154 $this->getChildNode()->removeAttribute(
"ItemClass");
161 return $this->getChildNode()->getAttribute(
"Class");
166 return $this->getChildNode()->getAttribute(
"ItemClass");
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="")
addItems(int $a_nr)
Add a number of items to list.
setItemStyleClass(string $a_val)
getOrderType()
Get order type.
setStartValue(int $a_val)
getNumberingType()
Get numbering type.
setNumberingType(string $a_val)
setListType(string $a_val)
setStyleClass(string $a_val)
Content object of ilPageObject (see ILIAS DTD).
createInitialChildNode(string $hier_id, string $pc_id, string $child, array $child_attributes=[])
setType(string $a_type)
Set Type.
Class ilPageObject Handles PageObjects of ILIAS Learning Modules (see ILIAS DTD)