ILIAS  Release_4_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilPCListItem Class Reference

Class ilPCListItem. More...

+ Inheritance diagram for ilPCListItem:
+ Collaboration diagram for ilPCListItem:

Public Member Functions

 init ()
 Init page content component.
 newItemAfter ()
 insert new list item after current one
 newItemBefore ()
 insert new list item before current one
 deleteItem ()
 delete row of cell
 moveItemDown ()
 move list item down
 moveItemUp ()
 move list item up
- Public Member Functions inherited from ilPageContent
 __construct ($a_dom)
 Constructor.
 getType ()
 Get type of page content.
 setNode (&$a_node)
 Set xml node of page content.
getNode ()
 Get xml node of page content.
 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.
 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)

Data Fields

 $dom
- 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.
- Protected Member Functions inherited from ilPageContent
 setType ($a_type)
 Set Type.

Detailed Description

Class ilPCListItem.

List Item 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.ilPCListItem.php 22210 2009-10-26 09:46:06Z akill

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

Member Function Documentation

ilPCListItem::deleteItem ( )

delete row of cell

Definition at line 81 of file class.ilPCListItem.php.

References $li, and ilPageContent\getNode().

{
$parent_node = $this->getNode()->parent_node();
$cnt = count($parent_node->child_nodes());
if ($cnt == 1)
{
// if list item is the last one -> delete whole list
$grandma = $parent_node->parent_node();
$grandma->unlink($grandma);
}
else
{
$li =& $this->getNode();
$li->unlink($li);
}
}

+ Here is the call graph for this function:

ilPCListItem::init ( )

Init page content component.

Reimplemented from ilPageContent.

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

References ilPageContent\setType().

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

+ Here is the call graph for this function:

ilPCListItem::moveItemDown ( )

move list item down

Definition at line 101 of file class.ilPCListItem.php.

References $li, and ilPageContent\getNode().

{
$li =& $this->getNode();
$next =& $li->next_sibling();
$next_copy = $next->clone_node(true);
$next_copy =& $li->insert_before($next_copy, $li);
$next->unlink($next);
}

+ Here is the call graph for this function:

ilPCListItem::moveItemUp ( )

move list item up

Definition at line 113 of file class.ilPCListItem.php.

References $li, and ilPageContent\getNode().

{
$li =& $this->getNode();
$prev =& $li->previous_sibling();
$li_copy = $li->clone_node(true);
$li_copy =& $prev->insert_before($li_copy, $prev);
$li->unlink($li);
}

+ Here is the call graph for this function:

ilPCListItem::newItemAfter ( )

insert new list item after current one

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

References $li, and ilPageContent\getNode().

{
$li =& $this->getNode();
$new_li =& $this->dom->create_element("ListItem");
if ($next_li =& $li->next_sibling())
{
$new_li =& $next_li->insert_before($new_li, $next_li);
}
else
{
$parent_list =& $li->parent_node();
$new_li =& $parent_list->append_child($new_li);
}
}

+ Here is the call graph for this function:

ilPCListItem::newItemBefore ( )

insert new list item before current one

Definition at line 70 of file class.ilPCListItem.php.

References $li, and ilPageContent\getNode().

{
$li =& $this->getNode();
$new_li =& $this->dom->create_element("ListItem");
$new_li =& $li->insert_before($new_li, $li);
}

+ Here is the call graph for this function:

Field Documentation

ilPCListItem::$dom

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


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