Public Member Functions | Data Fields

ilPCFileItem Class Reference

Inheritance diagram for ilPCFileItem:
Collaboration diagram for ilPCFileItem:

Public Member Functions

 ilPCFileItem (&$a_dom)
 Constructor public.
 newItemAfter ($a_id, $a_location, $a_format)
 insert new list item after current one
 newItemBefore ($a_id, $a_location, $a_format)
 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.ilPCFileItem.php.


Member Function Documentation

ilPCFileItem::deleteItem (  ) 

delete row of cell

Definition at line 120 of file class.ilPCFileItem.php.

References ilPageContent::getNode().

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

Here is the call graph for this function:

ilPCFileItem::ilPCFileItem ( &$  a_dom  ) 

Constructor public.

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

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

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

                $this->dom =& $a_dom;
        }

Here is the call graph for this function:

ilPCFileItem::moveItemDown (  ) 

move list item down

Definition at line 129 of file class.ilPCFileItem.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:

ilPCFileItem::moveItemUp (  ) 

move list item up

Definition at line 141 of file class.ilPCFileItem.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:

ilPCFileItem::newItemAfter ( a_id,
a_location,
a_format 
)

insert new list item after current one

Definition at line 56 of file class.ilPCFileItem.php.

References ilPageContent::getNode().

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

                // Identifier
                $id_node =& $this->dom->create_element("Identifier");
                $id_node =& $new_item->append_child($id_node);
                $id_node->set_attribute("Catalog", "ILIAS");
                $id_node->set_attribute("Entry", "il__file_".$a_id);

                // Location
                $loc_node =& $this->dom->create_element("Location");
                $loc_node =& $new_item->append_child($loc_node);
                $loc_node->set_attribute("Type", "LocalFile");
                $loc_node->set_content($a_location);

                // Format
                $form_node =& $this->dom->create_element("Format");
                $form_node =& $new_item->append_child($form_node);
                $form_node->set_content($a_format);
        }

Here is the call graph for this function:

ilPCFileItem::newItemBefore ( a_id,
a_location,
a_format 
)

insert new list item before current one

Definition at line 92 of file class.ilPCFileItem.php.

References ilPageContent::getNode().

        {
                $li =& $this->getNode();
                $new_item =& $this->dom->create_element("FileItem");
                $new_item =& $li->insert_before($new_item, $li);

                // Identifier
                $id_node =& $this->dom->create_element("Identifier");
                $id_node =& $new_item->append_child($id_node);
                $id_node->set_attribute("Catalog", "ILIAS");
                $id_node->set_attribute("Entry", "il__file_".$a_id);

                // Location
                $loc_node =& $this->dom->create_element("Location");
                $loc_node =& $new_item->append_child($loc_node);
                $loc_node->set_attribute("Type", "LocalFile");
                $loc_node->set_content($a_location);

                // Format
                $form_node =& $this->dom->create_element("Format");
                $form_node =& $new_item->append_child($form_node);
                $form_node->set_content($a_format);
        }

Here is the call graph for this function:


Field Documentation

ilPCFileItem::$dom

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


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