Public Member Functions | Data Fields

ilPCListItem Class Reference

Inheritance diagram for ilPCListItem:
Collaboration diagram for ilPCListItem:

Public Member Functions

 ilPCListItem (&$a_dom)
 Constructor public.
 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

Data Fields

 $dom

Detailed Description

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


Member Function Documentation

ilPCListItem::deleteItem (  ) 

delete row of cell

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

References ilPageContent::getNode().

        {
                $li =& $this->getNode();
                $li->unlink($li);
        }

Here is the call graph for this function:

ilPCListItem::ilPCListItem ( &$  a_dom  ) 

Constructor public.

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

References ilPageContent::ilPageContent(), and ilPageContent::setType().

        {
                parent::ilPageContent();
                $this->setType("li");

                $this->dom =& $a_dom;
        }

Here is the call graph for this function:

ilPCListItem::moveItemDown (  ) 

move list item down

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

References 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 107 of file class.ilPCListItem.php.

References 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 56 of file class.ilPCListItem.php.

References 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 75 of file class.ilPCListItem.php.

References 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: