20 "copage" => array(
"class" =>
"ilCOPageDefReader")
34 foreach ($this->readers as $k =>
$reader) {
36 $class_path =
"./setup/classes/class." . $class .
".php";
37 include_once($class_path);
38 $this->readers[$k][
"reader"] =
new $class();
41 $this->name = $a_name;
44 parent::__construct($a_path);
49 xml_set_object($a_xml_parser, $this);
50 xml_set_element_handler($a_xml_parser,
'handlerBeginTag',
'handlerEndTag');
51 xml_set_character_data_handler($a_xml_parser,
'handlerCharacterData');
61 $ilDB->manipulate(
"DELETE FROM il_object_def");
63 $ilDB->manipulate(
"DELETE FROM il_object_subobj");
65 $ilDB->manipulate(
"DELETE FROM il_object_group");
67 $ilDB->manipulate(
"DELETE FROM il_pluginslot");
69 $ilDB->manipulate(
"DELETE FROM il_component");
74 $ilDB->manipulate(
"DELETE FROM il_event_handling WHERE component NOT LIKE 'Plugins/%'");
76 $ilDB->manipulate(
"DELETE FROM il_object_sub_type");
78 foreach ($this->readers as $k =>
$reader) {
79 $this->readers[$k][
"reader"]->clearTables();
91 "DELETE FROM il_object_def WHERE id = %s",
97 "DELETE FROM il_object_subobj WHERE parent = %s OR subobj = %s",
98 array(
"text",
"text"),
114 $this->current_tag = $a_name;
117 if (isset($this->readers[$a_name])) {
118 $this->current_reader = $a_name;
122 if ($this->current_reader !=
"") {
127 $this->current_component
135 if ($a_attribs[
"repository"] === null) {
136 $a_attribs[
"repository"] =
true;
138 if ($a_attribs[
"workspace"] === null) {
139 $a_attribs[
"workspace"] =
false;
142 $this->current_object = $a_attribs[
"id"];
144 "INSERT INTO il_object_def (id, class_name, component,location," .
145 "checkbox,inherit,translate,devmode,allow_link,allow_copy,rbac,default_pos," .
146 "default_pres_pos,sideblock,grp,system,export,repository,workspace,administration," .
147 "amet,orgunit_permissions,lti_provider,offline_handling) VALUES " .
148 "(%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s)",
149 array(
"text",
"text",
"text",
"text",
"integer",
"integer",
"text",
"integer",
"integer",
"integer",
150 "integer",
"integer",
"integer",
"integer",
"text",
"integer",
"integer",
"integer",
"integer",
151 'integer',
'integer',
'integer',
'integer',
'integer'),
154 $a_attribs[
"class_name"],
155 $this->current_component,
156 $this->current_component .
"/" . $a_attribs[
"dir"],
157 (
int) $a_attribs[
"checkbox"],
158 (
int) $a_attribs[
"inherit"],
159 $a_attribs[
"translate"],
160 (
int) $a_attribs[
"devmode"],
161 (
int) $a_attribs[
"allow_link"],
162 (
int) $a_attribs[
"allow_copy"],
163 (
int) $a_attribs[
"rbac"],
164 (
int) $a_attribs[
"default_pos"],
165 (
int) $a_attribs[
"default_pres_pos"],
166 (
int) $a_attribs[
"sideblock"],
168 (
int) $a_attribs[
"system"],
169 (
int) $a_attribs[
"export"],
170 (
int) $a_attribs[
"repository"],
171 (
int) $a_attribs[
"workspace"],
172 (
int) $a_attribs[
'administration'],
173 (
int) $a_attribs[
'amet'],
174 (
int) $a_attribs[
'orgunit_permissions'],
175 (
int) $a_attribs[
'lti_provider'],
176 (
int) $a_attribs[
'offline_handling']
183 "INSERT INTO il_object_subobj (parent, subobj, mmax) VALUES (%s,%s,%s)",
184 array(
"text",
"text",
"integer"),
185 array($this->current_object, $a_attribs[
"id"], (
int) $a_attribs[
"max"])
191 "INSERT INTO il_object_subobj (parent, subobj, mmax) VALUES (%s,%s,%s)",
192 array(
"text",
"text",
"integer"),
193 array($a_attribs[
"id"], $this->current_object, (
int) $a_attribs[
"max"])
199 "INSERT INTO il_object_group (id, name, default_pres_pos) VALUES (%s,%s,%s)",
200 array(
"text",
"text",
"integer"),
201 array($a_attribs[
"id"], $a_attribs[
"name"], $a_attribs[
"default_pres_pos"])
206 $this->current_object = $a_attribs[
"id"];
207 $q =
"INSERT INTO il_pluginslot (component, id, name) VALUES (" .
208 $ilDB->quote($this->current_component,
"text") .
"," .
209 $ilDB->quote($a_attribs[
"id"],
"text") .
"," .
210 $ilDB->quote($a_attribs[
"name"],
"text") .
")";
211 $ilDB->manipulate($q);
215 $component = $a_attribs[
"component"];
217 $component = $this->current_component;
219 $q =
"INSERT INTO il_event_handling (component, type, id) VALUES (" .
220 $ilDB->quote($component,
"text") .
"," .
221 $ilDB->quote($a_attribs[
"type"],
"text") .
"," .
222 $ilDB->quote($a_attribs[
"id"],
"text") .
")";
223 $ilDB->manipulate($q);
227 $component = $a_attribs[
"component"];
229 $component = $this->current_component;
231 include_once
"Services/Cron/classes/class.ilCronManager.php";
233 $this->has_cron[$component][] = $a_attribs[
"id"];
236 case 'mailtemplates':
237 $this->in_mail_templates =
true;
241 if (!$this->in_mail_templates) {
245 $component = $a_attribs[
'component'];
247 $component = $this->current_component;
256 $this->mail_templates_by_component[$component][] = $a_attribs[
"id"];
260 $ilDB->manipulate(
"INSERT INTO il_object_sub_type " .
261 "(obj_type, sub_type, amet) VALUES (" .
262 $ilDB->quote($this->current_object,
"text") .
"," .
263 $ilDB->quote($a_attribs[
"id"],
"text") .
"," .
264 $ilDB->quote($a_attribs[
"amet"],
"integer") .
270 include_once
'./Services/SystemCheck/classes/class.ilSCGroups.php';
274 case 'systemcheck_task':
275 include_once
'./Services/SystemCheck/classes/class.ilSCGroups.php';
278 include_once
'./Services/SystemCheck/classes/class.ilSCTasks.php';
280 $tasks->updateFromComponentDefinition($a_attribs[
'identifier']);
284 require_once(
'./Services/WebAccessChecker/classes/class.ilWACSecurePath.php');
289 $ilWACSecurePath->setPath($a_attribs[
"path"]);
290 $ilWACSecurePath->create();
292 $ilWACSecurePath->setCheckingClass($a_attribs[
"checking-class"]);
293 $ilWACSecurePath->setInSecFolder((
bool) $a_attribs[
"in-sec-folder"]);
294 $ilWACSecurePath->setComponentDirectory(dirname($this->xml_file));
295 $ilWACSecurePath->update();
299 include_once
'./Services/Logging/classes/class.ilLogComponentLevels.php';
304 include_once
"Services/Badge/classes/class.ilBadgeHandler.php";
310 require_once
'./Services/PDFGeneration/classes/class.ilPDFCompInstaller.php';
330 if ($this->current_reader !=
"") {
333 if ($a_name ==
"module" || $a_name ==
"service") {
334 include_once
"Services/Cron/classes/class.ilCronManager.php";
336 $this->current_component,
337 (array) $this->has_cron[$this->current_component]
342 if (!in_array($this->
getComponentId(), (array) $this->has_badges)) {
343 include_once
"Services/Badge/classes/class.ilBadgeHandler.php";
350 if (isset($this->readers[$a_name])) {
351 $this->current_reader = null;
366 $a_data = preg_replace(
"/\n/",
"", $a_data);
367 $a_data = preg_replace(
"/\t+/",
"", $a_data);
369 if (!empty($a_data)) {
370 switch ($this->current_tag) {
381 $this->component_id = $a_component_id;
clearTables()
clear the tables
setComponentId($a_component_id)
Set from module or service reader.
static updateFromXML($a_component, $a_id, $a_class, $a_path=null)
Process data from module.xml/service.xml.
static updateFromXML($service, $purpose, $preferred)
static registerIdentifications(string $class_name, string $purpose)
static insertFromXML($a_component, $a_id, $a_class, $a_path)
static updateFromXML($a_component_id)
Import component definition.
handlerCharacterData($a_xml_parser, $a_data)
end tag handler
$mail_templates_by_component
Base class for sax-based expat parsing extended classes need to overwrite the method setHandlers and ...
setHandlers($a_xml_parser)
static updateFromXML($a_component_id)
type $ilDB
getComponentId()
Get component id.
static findOrFail($primary_key, array $add_constructor_args=array())
Tries to find the object and throws an Exception if object is not found, instead of returning null...
__construct($a_path, $a_name, $a_type)
static getInstance()
Get singleton instance.
static getInstanceByGroupId($a_group_id)
Get singleton instance.
handlerBeginTag($a_xml_parser, $a_name, $a_attribs)
Start tag handler.
static clearFromXml($a_component, array $a_new_templates)
handlerEndTag($a_xml_parser, $a_name)
End tag handler.
Component definition reader (reads common tags in module.xml and service.xml files) Name is misleadin...
static clearFromXML($a_component, array $a_xml_job_ids)
Clear job data.
static deleteObjectDefinition($a_id)
Delete an object definition (this is currently needed for test cases)