24 require_once(
"./Services/COPage/classes/class.ilPageContent.php");
54 $this->plug_node =& $a_node->first_child();
63 function create(&$a_pg_obj, $a_hier_id, $a_plugin_name,
68 $this->plug_node =& $this->dom->create_element(
"Plugged");
69 $this->plug_node =& $this->node->append_child($this->plug_node);
70 $this->plug_node->set_attribute(
"PluginName", $a_plugin_name);
71 $this->plug_node->set_attribute(
"PluginVersion", $a_plugin_version);
81 if (!is_object($this->plug_node))
87 $children = $this->plug_node->child_nodes();
88 for($i=0; $i<count($children); $i++)
90 $this->plug_node->remove_child($children[$i]);
94 foreach($a_properties as $key => $value)
96 $prop_node = $this->dom->create_element(
"PluggedProperty");
97 $prop_node =& $this->node->append_child($this->plug_node);
98 $prop_node->set_attribute(
"Name", $key);
99 $prop_node->set_content($value);
110 $properties = array();
112 if (is_object($this->plug_node))
115 $children = $this->plug_node->child_nodes();
116 for($i=0; $i<count($children); $i++)
118 if ($children[$i]->node_name() ==
"PluggedProperty")
120 $properties[$children[$i]->get_attribute(
"Name")] =
121 $children[$i]->get_content();
136 if (!empty($a_version))
138 $this->plug_node->set_attribute(
"PluginVersion", $a_version);
142 if ($this->plug_node->has_attribute(
"PluginVersion"))
144 $this->plug_node->remove_attribute(
"PluginVersion");
156 if (is_object($this->plug_node))
158 return $this->plug_node->get_attribute(
"PluginVersion");
171 $this->plug_node->set_attribute(
"PluginName", $a_name);
175 if ($this->plug_node->has_attribute(
"PluginName"))
177 $this->plug_node->remove_attribute(
"PluginName");
189 if (is_object($this->plug_node))
191 return $this->plug_node->get_attribute(
"PluginName");