ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
ilPCList Class Reference

Class ilPCList. More...

+ Inheritance diagram for ilPCList:
+ Collaboration diagram for ilPCList:

Public Member Functions

 init ()
 Init page content component. More...
 
 setNode ($a_node)
 Set pc node. More...
 
 create (&$a_pg_obj, $a_hier_id, $a_pc_id="")
 Create new list. More...
 
 addItems ($a_nr)
 Add a number of items to list. More...
 
 getOrderType ()
 Set order type. More...
 
 getListType ()
 Get list type. More...
 
 setListType ($a_val)
 Set list type. More...
 
 getNumberingType ()
 Get numbering type. More...
 
 setNumberingType ($a_val)
 Set numbering type. More...
 
 setStartValue ($a_val)
 Set start value. More...
 
 getStartValue ()
 Get start value. More...
 
 setStyleClass ($a_val)
 Set style class. More...
 
 getStyleClass ()
 Get style class. More...
 
- Public Member Functions inherited from ilPageContent
 __construct ($a_pg_obj)
 Constructor. More...
 
 setPage ($a_val)
 Set page. More...
 
 getPage ()
 Get page. More...
 
 init ()
 Init object. More...
 
 getType ()
 Get type of page content. More...
 
 setNode ($a_node)
 Set xml node of page content. More...
 
getNode ()
 Get xml node of page content. More...
 
 getJavascriptFiles ($a_mode)
 Get Javascript files. More...
 
 getCssFiles ($a_mode)
 Get css files. More...
 
 getOnloadCode ($a_mode)
 Get on load code. More...
 
 setHierId ($a_hier_id)
 Set hierarchical ID in xml structure. More...
 
 getHierId ()
 Get hierarchical id. More...
 
 lookupHierId ()
 Get hierarchical id from dom. More...
 
 readHierId ()
 Read PC Id. More...
 
 setPcId ($a_pcid)
 Set PC Id. More...
 
 getPCId ()
 Get PC Id. More...
 
 setFileDownloadLink ($a_download_link)
 Set file download link. More...
 
 getFileDownloadLink ()
 Get file download link. More...
 
 setProfileBackUrl ($url)
 
 getProfileBackUrl ()
 
 setFullscreenLink ($a_fullscreen_link)
 Set fullscreen link. More...
 
 getFullscreenLink ()
 Get fullscreen link. More...
 
 setSourcecodeDownloadScript ($script_name)
 Set sourcecode download script. More...
 
 getSourcecodeDownloadScript ()
 Get sourcecode download script. More...
 
 readPCId ()
 Read PC Id. More...
 
 writePCId ($a_pc_id)
 Write pc id. More...
 
 setEnabled ($value)
 Set Enabled value for page content component. More...
 
 enable ()
 Enable page content. More...
 
 disable ()
 Disable page content. More...
 
 isEnabled ()
 Check whether page content is enabled. More...
 
 createPageContentNode ($a_set_this_node=true)
 Create page content node (always use this method first when adding a new element) More...
 
 modifyPageContentPostXsl ($a_output, $a_mode, $a_abstract_only=false)
 Modify page content after xsl. More...
 

Data Fields

 $list_node
 
- Data Fields inherited from ilPageContent
 $hier_id
 
 $node
 
 $dom
 
 $page_lang
 

Additional Inherited Members

- Static Public Member Functions inherited from ilPageContent
static incEdId ($ed_id)
 Increases an hierarchical editing id at lowest level (last number) More...
 
static decEdId ($ed_id)
 Decreases an hierarchical editing id at lowest level (last number) More...
 
static haveSameContainer ($ed_id1, $ed_id2)
 Check, if two ids are in same container. More...
 
static sortHierIds ($a_array)
 Sort an array of Hier IDS in ascending order. More...
 
static isGreaterHierId ($a, $b)
 Check whether Hier ID $a is greater than Hier ID $b. More...
 
static getLangVars ()
 Get lang vars needed for editing. More...
 
static handleCopiedContent (DOMDocument $a_domdoc, $a_self_ass=true, $a_clone_mobs=false)
 Handle copied content. More...
 
static afterPageUpdate ($a_page, DOMDocument $a_domdoc, $a_xml, $a_creation)
 After page has been updated (or created) More...
 
static beforePageDelete ($a_page)
 Before page is being deleted. More...
 
static afterPageHistoryEntry ($a_page, DOMDocument $a_old_domdoc, $a_old_xml, $a_old_nr)
 After page history entry has been created. More...
 
- Protected Member Functions inherited from ilPageContent
 setType ($a_type)
 Set Type. More...
 
- Protected Attributes inherited from ilPageContent
 $profile_back_url
 
 $file_download_link
 
 $fullscreen_link
 
 $sourcecode_download_script
 
 $log
 

Detailed Description

Class ilPCList.

List content object (see ILIAS DTD)

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

Definition at line 16 of file class.ilPCList.php.

Member Function Documentation

◆ addItems()

ilPCList::addItems (   $a_nr)

Add a number of items to list.

Definition at line 51 of file class.ilPCList.php.

52 {
53 for ($i = 1; $i <= $a_nr; $i++) {
54 $new_item = $this->dom->create_element("ListItem");
55 $new_item = $this->list_node->append_child($new_item);
56 }
57 }
$i
Definition: metadata.php:24

References $i.

◆ create()

ilPCList::create ( $a_pg_obj,
  $a_hier_id,
  $a_pc_id = "" 
)

Create new list.

Definition at line 40 of file class.ilPCList.php.

41 {
42 $this->node = $this->createPageContentNode();
43 $a_pg_obj->insertContent($this, $a_hier_id, IL_INSERT_AFTER, $a_pc_id);
44 $this->list_node = $this->dom->create_element("List");
45 $this->list_node = $this->node->append_child($this->list_node);
46 }
const IL_INSERT_AFTER
createPageContentNode($a_set_this_node=true)
Create page content node (always use this method first when adding a new element)

References ilPageContent\createPageContentNode(), and IL_INSERT_AFTER.

+ Here is the call graph for this function:

◆ getListType()

ilPCList::getListType ( )

Get list type.

Definition at line 114 of file class.ilPCList.php.

115 {
116 if ($this->list_node->get_attribute("Type") == "Unordered") {
117 return "Unordered";
118 }
119 return "Ordered";
120 }

◆ getNumberingType()

ilPCList::getNumberingType ( )

Get numbering type.

Definition at line 135 of file class.ilPCList.php.

136 {
137 $nt = $this->list_node->get_attribute("NumberingType");
138 switch ($nt) {
139 case "Number":
140 case "Roman":
141 case "roman":
142 case "Alphabetic":
143 case "alphabetic":
144 case "Decimal":
145 return $nt;
146 break;
147
148 default:
149 return "Number";
150 }
151 }

◆ getOrderType()

ilPCList::getOrderType ( )

Set order type.

Get order type

Definition at line 89 of file class.ilPCList.php.

90 {
91 if ($this->list_node->get_attribute("Type") == "Unordered") {
92 return "Unordered";
93 }
94
95 $nt = $this->list_node->get_attribute("NumberingType");
96 switch ($nt) {
97 case "Number":
98 case "Roman":
99 case "roman":
100 case "Alphabetic":
101 case "alphabetic":
102 case "Decimal":
103 return $nt;
104 break;
105
106 default:
107 return "Number";
108 }
109 }

◆ getStartValue()

ilPCList::getStartValue ( )

Get start value.

Returns
int start value

Definition at line 190 of file class.ilPCList.php.

191 {
192 return $this->list_node->get_attribute("StartValue");
193 }

◆ getStyleClass()

ilPCList::getStyleClass ( )

Get style class.

Returns
string style class

Definition at line 216 of file class.ilPCList.php.

217 {
218 return $this->list_node->get_attribute("Class");
219 }

◆ init()

ilPCList::init ( )

Init page content component.

Reimplemented from ilPageContent.

Definition at line 23 of file class.ilPCList.php.

24 {
25 $this->setType("list");
26 }
setType($a_type)
Set Type.

References ilPageContent\setType().

+ Here is the call graph for this function:

◆ setListType()

ilPCList::setListType (   $a_val)

Set list type.

Parameters
stringlist type

Definition at line 127 of file class.ilPCList.php.

128 {
129 $this->list_node->set_attribute("Type", $a_val);
130 }

◆ setNode()

ilPCList::setNode (   $a_node)

Set pc node.

Reimplemented from ilPageContent.

Definition at line 31 of file class.ilPCList.php.

32 {
33 parent::setNode($a_node); // this is the PageContent node
34 $this->list_node = $a_node->first_child(); // this is the Table node
35 }

◆ setNumberingType()

ilPCList::setNumberingType (   $a_val)

Set numbering type.

Parameters
stringnumbering type

Definition at line 158 of file class.ilPCList.php.

159 {
160 if ($a_val != "") {
161 $this->list_node->set_attribute("NumberingType", $a_val);
162 } else {
163 if ($this->list_node->has_attribute("NumberingType")) {
164 $this->list_node->remove_attribute("NumberingType");
165 }
166 }
167 }

◆ setStartValue()

ilPCList::setStartValue (   $a_val)

Set start value.

Parameters
intstart value

Definition at line 174 of file class.ilPCList.php.

175 {
176 if ($a_val != "") {
177 $this->list_node->set_attribute("StartValue", $a_val);
178 } else {
179 if ($this->list_node->has_attribute("StartValue")) {
180 $this->list_node->remove_attribute("StartValue");
181 }
182 }
183 }

◆ setStyleClass()

ilPCList::setStyleClass (   $a_val)

Set style class.

Parameters
stringstyle class

Definition at line 200 of file class.ilPCList.php.

201 {
202 if (!in_array($a_val, array("", "BulletedList", "NumberedList"))) {
203 $this->list_node->set_attribute("Class", $a_val);
204 } else {
205 if ($this->list_node->has_attribute("Class")) {
206 $this->list_node->remove_attribute("Class");
207 }
208 }
209 }

Field Documentation

◆ $list_node

ilPCList::$list_node

Definition at line 18 of file class.ilPCList.php.


The documentation for this class was generated from the following file: