ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
class.ilPCMyCourses.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2010 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4require_once("./Services/COPage/classes/class.ilPageContent.php");
5
17{
18 var $dom;
19
23 function init()
24 {
25 $this->setType("mcrs");
26 }
27
32 static function getLangVars()
33 {
34 return array("ed_insert_my_courses", "pc_mcrs");
35 }
36
40 function setNode(&$a_node)
41 {
42 parent::setNode($a_node); // this is the PageContent node
43 $this->cach_node =& $a_node->first_child(); // this is the courses node
44 }
45
52 function create(&$a_pg_obj, $a_hier_id, $a_pc_id = "")
53 {
54 $this->node = $this->createPageContentNode();
55 $a_pg_obj->insertContent($this, $a_hier_id, IL_INSERT_AFTER, $a_pc_id);
56 $this->mcrs_node = $this->dom->create_element("MyCourses");
57 $this->mcrs_node = $this->node->append_child($this->mcrs_node);
58 }
59
63 function setData()
64 {
65 global $ilUser;
66
67 $this->mcrs_node->set_attribute("User", $ilUser->getId());
68
69 /* remove all children first
70 $children = $this->cach_node->child_nodes();
71 if($children)
72 {
73 foreach($children as $child)
74 {
75 $this->cach_node->remove_child($child);
76 }
77 }
78 */
79 }
80}
81
82?>
const IL_INSERT_AFTER
Class ilPCMyCourses.
init()
Init page content component.
static getLangVars()
Get lang vars needed for editing.
create(&$a_pg_obj, $a_hier_id, $a_pc_id="")
Create courses node in xml.
setNode(&$a_node)
Set node.
setData()
Set courses settings.
Class ilPageContent.
createPageContentNode($a_set_this_node=true)
Create page content node (always use this method first when adding a new element)
setType($a_type)
Set Type.
global $ilUser
Definition: imgupload.php:15