Public Member Functions | Data Fields

ilPCFileList Class Reference

Inheritance diagram for ilPCFileList:
Collaboration diagram for ilPCFileList:

Public Member Functions

 ilPCFileList (&$a_dom)
 Constructor public.
 setNode (&$a_node)
 create (&$a_pg_obj, $a_hier_id)
 appendItem ($a_id, $a_location, $a_format)
 setListTitle ($a_title, $a_language)
 getListTitle ()
 getLanguage ()

Data Fields

 $dom
 $list_node

Detailed Description

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


Member Function Documentation

ilPCFileList::appendItem ( a_id,
a_location,
a_format 
)

Definition at line 79 of file class.ilPCFileList.php.

        {
                // File Item
                $new_item =& $this->dom->create_element("FileItem");
                $new_item =& $this->list_node->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);
        }

ilPCFileList::create ( &$  a_pg_obj,
a_hier_id 
)

Definition at line 60 of file class.ilPCFileList.php.

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

ilPCFileList::getLanguage (  ) 

Definition at line 123 of file class.ilPCFileList.php.

        {
                $chlds =& $this->list_node->child_nodes();
                for($i=0; $i<count($chlds); $i++)
                {
                        if ($chlds[$i]->node_name() == "Title")
                        {
                                return $chlds[$i]->get_attribute("Language");
                        }
                }
                return "";
        }

ilPCFileList::getListTitle (  ) 

Definition at line 110 of file class.ilPCFileList.php.

        {
                $chlds =& $this->list_node->child_nodes();
                for($i=0; $i<count($chlds); $i++)
                {
                        if ($chlds[$i]->node_name() == "Title")
                        {
                                return $chlds[$i]->get_content();
                        }
                }
                return "";
        }

ilPCFileList::ilPCFileList ( &$  a_dom  ) 

Constructor public.

Definition at line 46 of file class.ilPCFileList.php.

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

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

                $this->dom =& $a_dom;
        }

Here is the call graph for this function:

ilPCFileList::setListTitle ( a_title,
a_language 
)

Definition at line 103 of file class.ilPCFileList.php.

References ilDOMUtil::setFirstOptionalElement().

        {
                ilDOMUtil::setFirstOptionalElement($this->dom,
                        $this->list_node, "Title", array("FileItem"),
                        $a_title, array("Language" => $a_language));
        }

Here is the call graph for this function:

ilPCFileList::setNode ( &$  a_node  ) 

Reimplemented from ilPageContent.

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

        {
                parent::setNode($a_node);               // this is the PageContent node
                $this->list_node =& $a_node->first_child();             // this is the Table node
        }


Field Documentation

ilPCFileList::$dom

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

ilPCFileList::$list_node

Definition at line 39 of file class.ilPCFileList.php.


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