ILIAS  Release_4_1_x_branch Revision 61804
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilPCResources Class Reference

Class ilPCResources. More...

+ Inheritance diagram for ilPCResources:
+ Collaboration diagram for ilPCResources:

Public Member Functions

 init ()
 Init page content component.
 setNode (&$a_node)
 Set node.
 create (&$a_pg_obj, $a_hier_id, $a_pc_id="")
 Create resources node in xml.
 setResourceListType ($a_type)
 Set Type of Resource List (currently only one)
 getResourceListType ()
 Get Resource Lis Type.
- 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.
 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
 $res_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.
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 ilPCResources.

Resources content object (see ILIAS DTD). Inserts Repository Resources of a Container Object,

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

Definition at line 17 of file class.ilPCResources.php.

Member Function Documentation

ilPCResources::create ( $a_pg_obj,
  $a_hier_id,
  $a_pc_id = "" 
)

Create resources node in xml.

Parameters
object$a_pg_objPage Object
string$a_hier_idHierarchical ID

Definition at line 45 of file class.ilPCResources.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->res_node =& $this->dom->create_element("Resources");
$this->res_node =& $this->node->append_child($this->res_node);
}

+ Here is the call graph for this function:

ilPCResources::getResourceListType ( )

Get Resource Lis Type.

Returns
string resource type group

Definition at line 78 of file class.ilPCResources.php.

{
if (is_object($this->res_node))
{
$children = $this->res_node->child_nodes();
if (is_object($children[0]))
{
return $children[0]->get_attribute("Type");
}
}
}
ilPCResources::init ( )

Init page content component.

Reimplemented from ilPageContent.

Definition at line 25 of file class.ilPCResources.php.

References ilPageContent\setType().

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

+ Here is the call graph for this function:

ilPCResources::setNode ( $a_node)

Set node.

Reimplemented from ilPageContent.

Definition at line 33 of file class.ilPCResources.php.

{
parent::setNode($a_node); // this is the PageContent node
$this->res_node =& $a_node->first_child(); // this is the Resources node
}
ilPCResources::setResourceListType (   $a_type)

Set Type of Resource List (currently only one)

Parameters
string$a_typeResource Type Group

Definition at line 58 of file class.ilPCResources.php.

{
if (!empty($a_type))
{
$children = $this->res_node->child_nodes();
for ($i=0; $i<count($children); $i++)
{
$this->res_node->remove_child($children[$i]);
}
$list_node =& $this->dom->create_element("ResourceList");
$list_node =& $this->res_node->append_child($list_node);
$list_node->set_attribute("Type", $a_type);
}
}

Field Documentation

ilPCResources::$dom

Definition at line 19 of file class.ilPCResources.php.

ilPCResources::$res_node

Definition at line 20 of file class.ilPCResources.php.


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