3 declare(strict_types=1);
    34         $this->db->manipulate(
"DELETE FROM il_object_def");
    35         $this->db->manipulate(
"DELETE FROM il_object_subobj");
    36         $this->db->manipulate(
"DELETE FROM il_object_group");
    37         $this->db->manipulate(
"DELETE FROM il_object_sub_type");
    43         $this->current_object = null;
    46     public function endComponent(
string $component, 
string $type): void
    48         $this->component = null;
    49         $this->current_object = null;
    52     public function beginTag(
string $name, array $attributes): void
    58                 if (($attributes[
"repository"] ?? null) === null) {
    59                     $attributes[
"repository"] = 
true;
    61                 if (($attributes[
"workspace"] ?? null) === null) {
    62                     $attributes[
"workspace"] = 
false;
    65                 $this->current_object = $attributes[
"id"];
    66                 $this->db->manipulateF(
    67                     "INSERT INTO il_object_def (id, class_name, component,location," .
    68                     "checkbox,inherit,translate,devmode,allow_link,allow_copy,rbac,default_pos," .
    69                     "default_pres_pos,sideblock,grp," . $this->db->quoteIdentifier(
"system") . 
",export,repository,workspace,administration," .
    70                     "amet,orgunit_permissions,lti_provider,offline_handling) VALUES " .
    71                     "(%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s)",
    72                     [
"text", 
"text", 
"text", 
"text", 
"integer", 
"integer", 
"text", 
"integer",
"integer",
"integer",
    73                         "integer",
"integer",
"integer",
"integer", 
"text", 
"integer", 
"integer", 
"integer", 
"integer",
    74                         'integer',
'integer',
'integer',
'integer',
'integer'],
    77                         $attributes[
"class_name"],
    79                         $this->component . 
"/" . $attributes[
"dir"],
    80                         (
int) ($attributes[
"checkbox"] ?? null),
    81                         (
int) ($attributes[
"inherit"] ?? null),
    82                         $attributes[
"translate"] ?? null,
    83                         (
int) ($attributes[
"devmode"] ?? null),
    84                         (
int) ($attributes[
"allow_link"] ?? null),
    85                         (
int) ($attributes[
"allow_copy"] ?? null),
    86                         (
int) ($attributes[
"rbac"] ?? null),
    87                         (
int) ($attributes[
"default_pos"] ?? null),
    88                         (
int) ($attributes[
"default_pres_pos"] ?? null),
    89                         (
int) ($attributes[
"sideblock"] ?? null),
    90                         $attributes[
"group"] ?? null,
    91                         (
int) ($attributes[
"system"] ?? null),
    92                         (
int) ($attributes[
"export"] ?? null),
    93                         (
int) ($attributes[
"repository"] ?? null),
    94                         (
int) ($attributes[
"workspace"] ?? null),
    95                         (
int) ($attributes[
'administration'] ?? null),
    96                         (
int) ($attributes[
'amet'] ?? null),
    97                         (
int) ($attributes[
'orgunit_permissions'] ?? null),
    98                         (
int) ($attributes[
'lti_provider'] ?? null),
    99                         (
int) ($attributes[
'offline_handling'] ?? null)
   105                 $this->db->manipulateF(
   106                     "INSERT INTO il_object_subobj (parent, subobj, mmax) VALUES (%s,%s,%s)",
   107                     [
"text", 
"text", 
"integer"],
   108                     [$this->current_object, $attributes[
"id"], (
int) ($attributes[
"max"] ?? null)]
   113                 $this->db->manipulateF(
   114                     "INSERT INTO il_object_subobj (parent, subobj, mmax) VALUES (%s,%s,%s)",
   115                     [
"text", 
"text", 
"integer"],
   116                     [$attributes[
"id"], $this->current_object, (
int) ($attributes[
"max"] ?? null)]
   121                 $this->db->manipulateF(
   122                     "INSERT INTO il_object_group (id, name, default_pres_pos) VALUES (%s,%s,%s)",
   123                     [
"text", 
"text", 
"integer"],
   124                     [$attributes[
"id"], $attributes[
"name"], $attributes[
"default_pres_pos"]]
   128                 $this->db->manipulate(
"INSERT INTO il_object_sub_type " .
   129                     "(obj_type, sub_type, amet) VALUES (" .
   130                     $this->db->quote($this->current_object, 
"text") . 
"," .
   131                     $this->db->quote($attributes[
"id"], 
"text") . 
"," .
   132                     $this->db->quote($attributes[
"amet"], 
"integer") .
   138     public function endTag(
string $name): void
 An ilComponentDefinitionProcessor processes some attributes from a component.xml (i.e. 
 
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. ...
 
beginComponent(string $component, string $type)
This method is called when parsing of component.xml for the given component starts. 
 
endTag(string $name)
This is called when a tag ends in the context of the given component. 
 
__construct(ilDBInterface $db)
 
purge()
This methods is supposed to purge existing data in the provider of the component, so new components c...
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...