ILIAS  Release_3_10_x_branch Revision 61812
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilPCFileList Class Reference

Class ilPCFileList. More...

+ Inheritance diagram for ilPCFileList:
+ Collaboration diagram for ilPCFileList:

Public Member Functions

 init ()
 Init page content component.
 setNode (&$a_node)
 Set xml node of page content.
 create (&$a_pg_obj, $a_hier_id, $a_pc_id="")
 appendItem ($a_id, $a_location, $a_format)
 setListTitle ($a_title, $a_language)
 getListTitle ()
 getLanguage ()
- Public Member Functions inherited from ilPageContent
 __construct ($a_dom)
 Constructor.
 getType ()
 Get type of page content.
getNode ()
 Get xml node of page content.
 setHierId ($a_hier_id)
 Set hierarchical ID in xml structure.
 getHierId ()
 Get hierarchical id.
 readHierId ()
 Read PC Id.
 setPcId ($a_pcid)
 Set PC Id.
 getPCId ()
 Get PC Id.
 readPCId ()
 Read PC Id.
 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

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

Detailed Description

Class ilPCFileList.

File 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.ilPCFileList.php 17171 2008-08-19 08:09:35Z akill

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

Member Function Documentation

ilPCFileList::appendItem (   $a_id,
  $a_location,
  $a_format 
)

Definition at line 72 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,
  $a_pc_id = "" 
)

Definition at line 54 of file class.ilPCFileList.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("FileList");
$this->list_node =& $this->node->append_child($this->list_node);
}

+ Here is the call graph for this function:

ilPCFileList::getLanguage ( )

Definition at line 116 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 103 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::init ( )

Init page content component.

Reimplemented from ilPageContent.

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

References ilPageContent\setType().

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

+ Here is the call graph for this function:

ilPCFileList::setListTitle (   $a_title,
  $a_language 
)

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

References ilDOMUtil\setFirstOptionalElement().

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

+ Here is the call graph for this function:

ilPCFileList::setNode ( $a_node)

Set xml node of page content.

Parameters
object$a_nodenode object

Reimplemented from ilPageContent.

Definition at line 48 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::$list_node

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


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