27         return [
"5.4.0", 
"4.1.0"];
    30     protected function getXmlNamespace(
string $a_entity, 
string $a_schema_version): string
    32         return "https://www.ilias.de/xml/Services/News/" . $a_entity;
    35     protected function getTypes(
string $a_entity, 
string $a_version): array
    37         if ($a_entity === 
"news") {
    45                         "Priority" => 
"integer",
    46                         "ContextObjId" => 
"integer",
    47                         "ContextObjType" => 
"text",
    48                         "ContextSubObjId" => 
"integer",
    49                         "ContextSubObjType" => 
"text",
    50                         "ContentType" => 
"text",
    51                         "Visibility" => 
"text",
    52                         "ContentLong" => 
"text",
    53                         "ContentIsLangVar" => 
"integer",
    59         if ($a_entity === 
"news_settings") {
    64                         "PublicFeed" => 
"integer",
    65                         "DefaultVisibility" => 
"text",
    66                         "KeepRssMin" => 
"integer",
    67                         "HideNewsPerDate" => 
"integer",
    68                         "HideNewsDate" => 
"text",
    69                         "PublicNotifications" => 
"integer"    76     public function readData(
string $a_entity, 
string $a_version, array $a_ids): void
    80         if (!is_array($a_ids)) {
    84         if ($a_entity === 
"news") {
    89                         " context_obj_id, context_obj_type, context_sub_obj_id, context_sub_obj_type, " .
    90                         " content_type, visibility, content_long, content_is_lang_var, mob_id, playtime" .
    91                         " FROM il_news_item " .
    93                         $ilDB->in(
"id", $a_ids, 
false, 
"integer"));
    98         if ($a_entity === 
"news_settings") {
   101                     foreach ($a_ids as $obj_id) {
   102                         $this->data[$obj_id][
"ObjId"] = $obj_id;
   121                 if ($a_rec[
"MobId"] > 0) {
   122                     $mob_id = $a_mapping->
getMapping(
"Services/MediaObjects", 
"mob", $a_rec[
"MobId"]);
   124                 $c = (
int) $a_rec[
"ContextObjId"] . 
":" . $a_rec[
"ContextObjType"] . 
":" . (
int) $a_rec[
"ContextSubObjId"] .
   125                     ":" . $a_rec[
"ContextSubObjType"];
   130                 $newObj->setTitle($a_rec[
"Title"]);
   131                 $newObj->setContent($a_rec[
"Content"]);
   132                 $newObj->setPriority($a_rec[
"Priority"]);
   133                 $newObj->setContextObjId((
int) 
$context[0]);
   134                 $newObj->setContextObjType($context[1]);
   135                 $newObj->setContextSubObjId((
int) $context[2]);
   136                 $newObj->setContextSubObjType($context[3]);
   137                 $newObj->setContentType($a_rec[
"ContentType"]);
   138                 $newObj->setVisibility($a_rec[
"Visibility"]);
   139                 $newObj->setContentLong($a_rec[
"ContentLong"]);
   140                 $newObj->setContentIsLangVar($a_rec[
"ContentIsLangVar"]);
   141                 $newObj->setMobId((
int) $mob_id);
   142                 $newObj->setPlaytime($a_rec[
"Playtime"]);
   144                 $a_mapping->
addMapping(
"Services/News", 
"news", $a_rec[
"Id"], (
string) $newObj->getId());
   147             case "news_settings":
   150                 $new_obj_id = $dummy_dataset->getNewObjId($a_mapping, $a_rec[
"ObjId"]);
   152                 if ($new_obj_id > 0 && $a_schema_version === 
"5.4.0") {
   154                         "public_feed" => 
"PublicFeed",
   155                         "keep_rss_min" => 
"KeepRssMin",
   156                         "default_visibility" => 
"DefaultVisibility",
   157                         "hide_news_per_date" => 
"HideNewsPerDate",
   158                         "hide_news_date" => 
"HideNewsDate",
   159                         "public_notifications" => 
"PublicNotifications"   160                          ] as $set => $field) {
 
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)
 
importRecord(string $a_entity, array $a_types, array $a_rec, ilImportMapping $a_mapping, string $a_schema_version)
 
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)
 
static _lookup(string $a_type, string $a_setting, int $a_user=0, int $a_block_id=0)
Lookup setting from database. 
 
readData(string $a_entity, string $a_version, array $a_ids)
 
static _write(string $a_type, string $a_setting, string $a_value, int $a_user=0, int $a_block_id=0)
Write setting to database. 
 
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 ...
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
A news item can be created by different sources. 
 
stripTags(array $rec, array $omit_keys=[])