ILIAS  Release_4_4_x_branch Revision 61816
 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 pc node.
 create (&$a_pg_obj, $a_hier_id, $a_pc_id="")
 Create new list.
 addItems ($a_nr)
 Add a number of items to list.
 getOrderType ()
 Set order type.
 getListType ()
 Get list type.
 setListType ($a_val)
 Set list type.
 getNumberingType ()
 Get numbering type.
 setNumberingType ($a_val)
 Set numbering type.
 setStartValue ($a_val)
 Set start value.
 getStartValue ()
 Get start value.
 setStyleClass ($a_val)
 Set style class.
 getStyleClass ()
 Get style class.
- Public Member Functions inherited from ilPageContent
 __construct ($a_pg_obj)
 Constructor.
 setPage ($a_val)
 Set page.
 getPage ()
 Get page.
 getType ()
 Get type of page content.
getNode ()
 Get xml node of page content.
 getJavascriptFiles ()
 Get Javascript files.
 getCssFiles ()
 Get css files.
 setHierId ($a_hier_id)
 Set hierarchical ID in xml structure.
 getHierId ()
 Get hierarchical id.
 lookupHierId ()
 Get hierarchical id from dom.
 readHierId ()
 Read PC Id.
 setPcId ($a_pcid)
 Set PC Id.
 getPCId ()
 Get PC Id.
 readPCId ()
 Read PC Id.
 writePCId ($a_pc_id)
 Write pc id.
 isGreaterHierId ($a, $b)
 Check whether Hier ID $a is greater than Hier ID $b.
 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)
 modifyPageContentPostXsl ($a_output, $a_mode)
 Modify page content after xsl.

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.
static sortHierIds ($a_array)
 Sort an array of Hier IDS in ascending order.
static getLangVars ()
 Get lang vars needed for editing.
static handleCopiedContent (DOMDocument $a_domdoc, $a_self_ass=true, $a_clone_mobs=false)
 Handle copied content.
static afterPageUpdate ($a_page, DOMDocument $a_domdoc, $a_xml, $a_creation)
 After page has been updated (or created)
static beforePageDelete ($a_page)
 Before page is being deleted.
static afterPageHistoryEntry ($a_page, DOMDocument $a_old_domdoc, $a_old_xml, $a_old_nr)
 After page history entry has been created.
- 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 43464 2013-07-17 09:18:27Z akill

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

Member Function Documentation

ilPCList::addItems (   $a_nr)

Add a number of items to list.

Definition at line 51 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 = "" 
)

Create new list.

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

References ilPageContent\createPageContentNode(), and IL_INSERT_AFTER.

{
$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::getListType ( )

Get list type.

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

{
if ($this->list_node->get_attribute("Type") == "Unordered")
{
return "Unordered";
}
return "Ordered";
}
ilPCList::getNumberingType ( )

Get numbering type.

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

{
$nt = $this->list_node->get_attribute("NumberingType");
switch ($nt)
{
case "Number":
case "Roman":
case "roman":
case "Alphabetic":
case "alphabetic":
case "Decimal":
return $nt;
break;
default:
return "Number";
}
}
ilPCList::getOrderType ( )

Set order type.

Get order type

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

{
if ($this->list_node->get_attribute("Type") == "Unordered")
{
return "Unordered";
}
$nt = $this->list_node->get_attribute("NumberingType");
switch ($nt)
{
case "Number":
case "Roman":
case "roman":
case "Alphabetic":
case "alphabetic":
case "Decimal":
return $nt;
break;
default:
return "Number";
}
}
ilPCList::getStartValue ( )

Get start value.

Returns
int start value

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

{
return $this->list_node->get_attribute("StartValue");
}
ilPCList::getStyleClass ( )

Get style class.

Returns
string style class

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

{
return $this->list_node->get_attribute("Class");
}
ilPCList::init ( )

Init page content component.

Reimplemented from ilPageContent.

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

References ilPageContent\setType().

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

+ Here is the call graph for this function:

ilPCList::setListType (   $a_val)

Set list type.

Parameters
stringlist type

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

{
$this->list_node->set_attribute("Type", $a_val);
}
ilPCList::setNode ( $a_node)

Set pc node.

Reimplemented from ilPageContent.

Definition at line 31 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::setNumberingType (   $a_val)

Set numbering type.

Parameters
stringnumbering type

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

{
if ($a_val != "")
{
$this->list_node->set_attribute("NumberingType", $a_val);
}
else
{
if ($this->list_node->has_attribute("NumberingType"))
{
$this->list_node->remove_attribute("NumberingType");
}
}
}
ilPCList::setStartValue (   $a_val)

Set start value.

Parameters
intstart value

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

{
if ($a_val != "")
{
$this->list_node->set_attribute("StartValue", $a_val);
}
else
{
if ($this->list_node->has_attribute("StartValue"))
{
$this->list_node->remove_attribute("StartValue");
}
}
}
ilPCList::setStyleClass (   $a_val)

Set style class.

Parameters
stringstyle class

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

{
if (!in_array($a_val, array("", "BulletedList", "NumberedList")))
{
$this->list_node->set_attribute("Class", $a_val);
}
else
{
if ($this->list_node->has_attribute("Class"))
{
$this->list_node->remove_attribute("Class");
}
}
}

Field Documentation

ilPCList::$list_node

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


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