38 $this->name = $a_name;
39 $this->type = $a_type;
46 xml_set_object($a_xml_parser,$this);
47 xml_set_element_handler($a_xml_parser,
'handlerBeginTag',
'handlerEndTag');
48 xml_set_character_data_handler($a_xml_parser,
'handlerCharacterData');
58 $ilDB->manipulate(
"DELETE FROM il_object_def");
60 $ilDB->manipulate(
"DELETE FROM il_object_subobj");
62 $ilDB->manipulate(
"DELETE FROM il_object_group");
64 $ilDB->manipulate(
"DELETE FROM il_pluginslot");
66 $ilDB->manipulate(
"DELETE FROM il_component");
76 $ilDB->manipulateF(
"DELETE FROM il_object_def WHERE id = %s",
77 array(
"text"), array($a_id));
79 $ilDB->manipulateF(
"DELETE FROM il_object_subobj WHERE parent = %s OR subobj = %s",
80 array(
"text",
"text"), array($a_id, $a_id));
95 $this->current_tag = $a_name;
100 $this->current_object = $a_attribs[
"id"];
101 $ilDB->manipulateF(
"INSERT INTO il_object_def (id, class_name, component,location,".
102 "checkbox,inherit,translate,devmode,allow_link,allow_copy,rbac,default_pos,default_pres_pos,sideblock,grp,system) VALUES ".
103 "(%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s)",
104 array(
"text",
"text",
"text",
"text",
"integer",
"integer",
"text",
"integer",
"integer",
"integer",
105 "integer",
"integer",
"integer",
"integer",
"text",
"integer"),
108 $a_attribs[
"class_name"],
109 $this->current_component,
110 $this->current_component.
"/".$a_attribs[
"dir"],
111 (
int) $a_attribs[
"checkbox"],
112 (
int) $a_attribs[
"inherit"],
113 $a_attribs[
"translate"],
114 (
int) $a_attribs[
"devmode"],
115 (
int) $a_attribs[
"allow_link"],
116 (
int) $a_attribs[
"allow_copy"],
117 (
int) $a_attribs[
"rbac"],
118 (
int) $a_attribs[
"default_pos"],
119 (
int) $a_attribs[
"default_pres_pos"],
120 (
int) $a_attribs[
"sideblock"],
122 (
int) $a_attribs[
"system"]));
126 $ilDB->manipulateF(
"INSERT INTO il_object_subobj (parent, subobj, mmax) VALUES (%s,%s,%s)",
127 array(
"text",
"text",
"integer"),
128 array($this->current_object, $a_attribs[
"id"], (
int) $a_attribs[
"max"]));
132 $ilDB->manipulateF(
"INSERT INTO il_object_subobj (parent, subobj, mmax) VALUES (%s,%s,%s)",
133 array(
"text",
"text",
"integer"),
134 array($a_attribs[
"id"], $this->current_object, (
int) $a_attribs[
"max"]));
138 $ilDB->manipulateF(
"INSERT INTO il_object_group (id, name, default_pres_pos) VALUES (%s,%s,%s)",
139 array(
"text",
"text",
"integer"),
140 array($a_attribs[
"id"], $a_attribs[
"name"], $a_attribs[
"default_pres_pos"]));
144 $this->current_object = $a_attribs[
"id"];
145 $q =
"INSERT INTO il_pluginslot (component, id, name) VALUES (".
146 $ilDB->quote($this->current_component,
"text").
",".
147 $ilDB->quote($a_attribs[
"id"],
"text").
",".
148 $ilDB->quote($a_attribs[
"name"],
"text").
")";
149 $ilDB->manipulate(
$q);
176 $a_data = preg_replace(
"/\n/",
"",$a_data);
177 $a_data = preg_replace(
"/\t+/",
"",$a_data);
181 switch ($this->current_tag)