ILIAS  Release_3_10_x_branch Revision 61812
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilPCList Class Reference

Class ilPCList. More...

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

Public Member Functions

 init ()
 Init page content component.
 setNode (&$a_node)
 Set xml node of page content.
 create (&$a_pg_obj, $a_hier_id, $a_pc_id="")
 addItems ($a_nr)
 setOrderType ($a_type="Unordered")
- Public Member Functions inherited from ilPageContent
 __construct ($a_dom)
 Constructor.
 getType ()
 Get type of page content.
getNode ()
 Get xml node of page content.
 setHierId ($a_hier_id)
 Set hierarchical ID in xml structure.
 getHierId ()
 Get hierarchical id.
 readHierId ()
 Read PC Id.
 setPcId ($a_pcid)
 Set PC Id.
 getPCId ()
 Get PC Id.
 readPCId ()
 Read PC Id.
 setEnabled ($value)
 Set Enabled value for page content component.
 enable ()
 Enable page content.
 disable ()
 Disable page content.
 isEnabled ()
 Check whether page content is enabled.
 createPageContentNode ($a_set_this_node=true)
 Create page content node (always use this method first when adding a new element)

Data Fields

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

Additional Inherited Members

- Static Public Member Functions inherited from ilPageContent
static incEdId ($ed_id)
 Increases an hierarchical editing id at lowest level (last number)
static decEdId ($ed_id)
 Decreases an hierarchical editing id at lowest level (last number)
static haveSameContainer ($ed_id1, $ed_id2)
 Check, if two ids are in same container.
- Protected Member Functions inherited from ilPageContent
 setType ($a_type)
 Set Type.

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:
class.ilPCList.php 17171 2008-08-19 08:09:35Z akill

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

Member Function Documentation

ilPCList::addItems (   $a_nr)

Definition at line 63 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,
  $a_pc_id = "" 
)

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

References ilPageContent\createPageContentNode(), and IL_INSERT_AFTER.

{
//echo "::".is_object($this->dom).":";
$this->node = $this->createPageContentNode();
$a_pg_obj->insertContent($this, $a_hier_id, IL_INSERT_AFTER, $a_pc_id);
$this->list_node =& $this->dom->create_element("List");
$this->list_node =& $this->node->append_child($this->list_node);
}

+ Here is the call graph for this function:

ilPCList::init ( )

Init page content component.

Reimplemented from ilPageContent.

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

References ilPageContent\setType().

{
$this->setType("list");
}

+ Here is the call graph for this function:

ilPCList::setNode ( $a_node)

Set xml node of page content.

Parameters
object$a_nodenode object

Reimplemented from ilPageContent.

Definition at line 48 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 72 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;
}
}

Field Documentation

ilPCList::$list_node

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


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