3 declare(strict_types=1);
    19         return array(
"4.3.0");
    25     protected function getXmlNamespace(
string $a_entity, 
string $a_schema_version): string
    27         return "http://www.ilias.de/xml/Services/Calendar/" . $a_entity;
    33     protected function getTypes(
string $a_entity, 
string $a_version): array
    36         if ($a_entity == 
"calendar") {
    50         if ($a_entity == 
"cal_entry") {
    57                         "Description" => 
"text",
    59                         "Fullday" => 
"integer",
    62                         "Informations" => 
"text",
    63                         "AutoGenerated" => 
"integer",
    64                         "ContextId" => 
"integer",
    65                         "TranslationType" => 
"integer",
    66                         "Notification" => 
"integer"    72         if ($a_entity == 
"cal_assignment") {
    77                         "EntryId" => 
"integer"    83         if ($a_entity == 
"recurrence_rule") {
    87                         "RuleId" => 
"integer",
    88                         "EntryId" => 
"integer",
    89                         "CalRecurrence" => 
"integer",
    91                         "FreqUntilDate" => 
"text",
    92                         "FreqUntilCount" => 
"integer",
    93                         "Intervall" => 
"integer",
    97                         "Bymonthday" => 
"text",
    98                         "Byyearday" => 
"text",
   100                         "Weekstart" => 
"text"   110     public function readData(
string $a_entity, 
string $a_version, array $a_ids): void
   112         if (!is_array($a_ids)) {
   113             $a_ids = array($a_ids);
   117         if ($a_entity == 
"calendar") {
   118             switch ($a_version) {
   121                         " FROM cal_categories " .
   123                         $this->db->in(
"cat_id", $a_ids, 
false, 
"integer"));
   129         if ($a_entity == 
"cal_assignment") {
   130             switch ($a_version) {
   133                         " FROM cal_cat_assignments " .
   135                         $this->db->in(
"cat_id", $a_ids, 
false, 
"integer"));
   141         if ($a_entity == 
"cal_entry") {
   142             switch ($a_version) {
   145                         " starta, enda, informations, auto_generated, context_id, translation_type, notification " .
   146                         " FROM cal_entries " .
   148                         $this->db->in(
"cal_id", $a_ids, 
false, 
"integer"));
   154         if ($a_entity == 
"recurrence_rule") {
   155             switch ($a_version) {
   157                     $this->
getDirectDataFromQuery(
"SELECT rule_id, cal_id entry_id, cal_recurrence, freq_type, freq_until_date, freq_until_count, " .
   158                         " intervall, byday, byweekno, bymonth, bymonthday, byyearday, bysetpos, weekstart " .
   159                         " FROM cal_recurrence_rules " .
   161                         $this->db->in(
"cal_id", $a_ids, 
false, 
"integer"));
   173         ?array $a_rec = null,
   180                 foreach ($assignmnts as $cal_id) {
   181                     $entries[$cal_id] = $cal_id;
   184                     "cal_entry" => array(
"ids" => $entries),
   185                     "cal_assignment" => array(
"ids" => $a_rec[
"CatId"] ?? null)
   189                     "recurrence_rule" => array(
"ids" => $a_rec[
"Id"] ?? null)
   204         string $a_schema_version
   210                 if (($a_rec[
"Type"] ?? 0) == 1) {
   211                     $usr_id = (
int) $a_mapping->
getMapping(
"Services/User", 
"usr", $a_rec[
"ObjId"]);
   214                         $category->setTitle((
string) $a_rec[
"Title"]);
   215                         $category->setColor((
string) $a_rec[
"Color"]);
   217                         $category->setObjId((
int) $usr_id);
   223                             (
string) $category->getCategoryID()
   232                 if ((
int) ($a_rec[
"ContextId"] ?? 0) == 0) {
   234                     $entry->setTitle((
string) $a_rec[
"Title"]);
   235                     $entry->setSubtitle((
string) $a_rec[
"Subtitle"]);
   236                     $entry->setDescription((
string) $a_rec[
"Description"]);
   237                     $entry->setLocation((
string) $a_rec[
"Location"]);
   238                     $entry->setFullday((
bool) $a_rec[
"Fullday"]);
   239                     if ($a_rec[
"Starta"] != 
"") {
   242                     if (($a_rec[
"Enda"] ?? 
'') != 
"") {
   245                     $entry->setFurtherInformations((
string) ($a_rec[
"Informations"] ?? 
''));
   246                     $entry->setAutoGenerated((
bool) ($a_rec[
"AutoGenerated"] ?? 
false));
   247                     $entry->setContextId((
int) ($a_rec[
"ContextId"] ?? 0));
   248                     $entry->setTranslationType((
int) ($a_rec[
"TranslationType"] ?? 0));
   249                     $entry->enableNotification((
bool) ($a_rec[
"Notification"] ?? 
false));
   255                         (
string) $entry->getEntryId()
   260             case "cal_assignment":
   261                 $cat_id = (
int) $a_mapping->
getMapping(
"Services/Calendar", 
"calendar", $a_rec[
"CatId"]);
   262                 $entry_id = (
int) $a_mapping->
getMapping(
"Services/Calendar", 
"cal_entry", $a_rec[
"EntryId"]);
   263                 if ($cat_id > 0 && $entry_id > 0) {
   265                     $ass->addAssignment($cat_id);
   269             case "recurrence_rule":
   270                 $entry_id = $a_mapping->
getMapping(
"Services/Calendar", 
"cal_entry", $a_rec[
"EntryId"]);
   273                     $rec->setEntryId((
int) $entry_id);
   274                     $rec->setRecurrence((
int) $a_rec[
"CalRecurrence"]);
   275                     $rec->setFrequenceType((
string) $a_rec[
"FreqType"]);
   276                     if ($a_rec[
"FreqUntilDate"] != 
"") {
   279                     $rec->setFrequenceUntilCount((
int) $a_rec[
"FreqUntilCount"]);
   280                     $rec->setInterval((
int) ($a_rec[
"Interval"] ?? 0));
   281                     $rec->setBYDAY((
string) ($a_rec[
"Byday"] ?? 
''));
   282                     $rec->setBYWEEKNO((
string) ($a_rec[
"Byweekno"] ?? 
''));
   283                     $rec->setBYMONTH((
string) ($a_rec[
"Bymonth"] ?? 
''));
   284                     $rec->setBYMONTHDAY((
string) ($a_rec[
"Bymonthday"] ?? 
''));
   285                     $rec->setBYYEARDAY((
string) ($a_rec[
"Byyearday"] ?? 
''));
   286                     $rec->setBYSETPOS((
string) ($a_rec[
"Bysetpos"] ?? 
''));
   287                     $rec->setWeekstart((
string) ($a_rec[
"Weekstart"] ?? 
''));
   293                         (
string) $rec->getRecurrenceId()
 This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
getXmlNamespace(string $a_entity, string $a_schema_version)
 
getTypes(string $a_entity, string $a_version)
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
readData(string $a_entity, string $a_version, array $a_ids)
 
Stores calendar categories. 
 
addMapping(string $a_comp, string $a_entity, string $a_old_id, string $a_new_id)
 
getMapping(string $a_comp, string $a_entity, string $a_old_id)
 
importRecord(string $a_entity, array $a_types, array $a_rec, ilImportMapping $a_mapping, string $a_schema_version)
 
getDirectDataFromQuery(string $a_query, bool $a_convert_to_leading_upper=true, bool $a_set=true)
Get data from query.This is a standard procedure, all db field names are directly mapped to abstract ...
 
static _getAssignedAppointments(array $a_cat_id)
Get assigned apointments. 
 
static _lookupType(int $id, bool $reference=false)
 
getDependencies(string $a_entity, string $a_version, ?array $a_rec=null, ?array $a_ids=null)