19 declare(strict_types=1);
35 $this->db->manipulate(
"DELETE FROM il_object_def");
36 $this->db->manipulate(
"DELETE FROM il_object_subobj");
37 $this->db->manipulate(
"DELETE FROM il_object_group");
38 $this->db->manipulate(
"DELETE FROM il_object_sub_type");
44 $this->current_object =
null;
47 public function endComponent(
string $component,
string $type): void
49 $this->component =
null;
50 $this->current_object =
null;
53 public function beginTag(
string $name, array $attributes): void
59 if (($attributes[
"repository"] ??
null) === null) {
60 $attributes[
"repository"] =
true;
62 if (($attributes[
"workspace"] ?? null) === null) {
63 $attributes[
"workspace"] =
false;
66 $this->current_object = $attributes[
"id"];
67 $this->db->manipulateF(
68 "INSERT INTO il_object_def (id, class_name, component,location," .
69 "checkbox,inherit,translate,devmode,allow_link,allow_copy,rbac,default_pos," .
70 "default_pres_pos,sideblock,grp," . $this->db->quoteIdentifier(
"system") .
",export,repository,workspace,administration," .
71 "amet,orgunit_permissions,lti_provider,offline_handling) VALUES " .
72 "(%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s)",
73 [
"text",
"text",
"text",
"text",
"integer",
"integer",
"text",
"integer",
"integer",
"integer",
74 "integer",
"integer",
"integer",
"integer",
"text",
"integer",
"integer",
"integer",
"integer",
75 'integer',
'integer',
'integer',
'integer',
'integer'],
78 $attributes[
"class_name"],
80 $this->component .
"/" . $attributes[
"dir"],
81 (
int) ($attributes[
"checkbox"] ?? null),
82 (
int) ($attributes[
"inherit"] ?? null),
83 $attributes[
"translate"] ??
null,
84 (
int) ($attributes[
"devmode"] ?? null),
85 (
int) ($attributes[
"allow_link"] ?? null),
86 (
int) ($attributes[
"allow_copy"] ?? null),
87 (
int) ($attributes[
"rbac"] ?? null),
88 (
int) ($attributes[
"default_pos"] ?? null),
89 (
int) ($attributes[
"default_pres_pos"] ?? null),
90 (
int) ($attributes[
"sideblock"] ?? null),
91 $attributes[
"group"] ??
null,
92 (
int) ($attributes[
"system"] ?? null),
93 (
int) ($attributes[
"export"] ?? null),
94 (
int) ($attributes[
"repository"] ?? null),
95 (
int) ($attributes[
"workspace"] ?? null),
96 (
int) ($attributes[
'administration'] ?? null),
97 (
int) ($attributes[
'amet'] ?? null),
98 (
int) ($attributes[
'orgunit_permissions'] ?? null),
99 (
int) ($attributes[
'lti_provider'] ?? null),
100 (
int) ($attributes[
'offline_handling'] ?? null)
106 $this->db->manipulateF(
107 "INSERT INTO il_object_subobj (parent, subobj, mmax) VALUES (%s,%s,%s)",
108 [
"text",
"text",
"integer"],
109 [$this->current_object, $attributes[
"id"], (
int) ($attributes[
"max"] ?? null)]
114 $this->db->manipulateF(
115 "INSERT INTO il_object_subobj (parent, subobj, mmax) VALUES (%s,%s,%s)",
116 [
"text",
"text",
"integer"],
117 [$attributes[
"id"], $this->current_object, (
int) ($attributes[
"max"] ?? null)]
122 $this->db->manipulateF(
123 "INSERT INTO il_object_group (id, name, default_pres_pos) VALUES (%s,%s,%s)",
124 [
"text",
"text",
"integer"],
125 [$attributes[
"id"], $attributes[
"name"], $attributes[
"default_pres_pos"]]
129 $this->db->manipulate(
"INSERT INTO il_object_sub_type " .
130 "(obj_type, sub_type, amet) VALUES (" .
131 $this->db->quote($this->current_object,
"text") .
"," .
132 $this->db->quote($attributes[
"id"],
"text") .
"," .
133 $this->db->quote($attributes[
"amet"],
"integer") .
139 public function endTag(
string $name): void
beginComponent(string $component, string $type)
This method is called when parsing of component.xml for the given component starts.
An ilComponentDefinitionProcessor processes some attributes from a component.xml (i.e.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
beginTag(string $name, array $attributes)
This is called when a tag starts in the context of the given component.
endComponent(string $component, string $type)
This method is called when parsing of component.xml for the given component ends. ...
__construct(private readonly \ilDBInterface $db)
endTag(string $name)
This is called when a tag ends in the context of the given component.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
purge()
This methods is supposed to purge existing data in the provider of the component, so new components c...