4 include_once(
"./Services/DataSet/classes/class.ilDataSet.php");
23 return array(
"4.1.0");
34 return "http://www.ilias.de/xml/Services/News/".$a_entity;
43 protected function getTypes($a_entity, $a_version)
45 if ($a_entity ==
"news")
54 "Priority" =>
"integer",
55 "ContextObjId" =>
"integer",
56 "ContextObjType" =>
"text",
57 "ContextSubObjId" =>
"integer",
58 "ContextSubObjType" =>
"text",
59 "ContentType" =>
"text",
60 "Visibility" =>
"text",
61 "ContentLong" =>
"text",
62 "ContentIsLangVar" =>
"integer",
77 function readData($a_entity, $a_version, $a_ids, $a_field =
"")
81 if (!is_array($a_ids))
83 $a_ids =
array($a_ids);
86 if ($a_entity ==
"news")
92 " context_obj_id, context_obj_type, context_sub_obj_id, context_sub_obj_type, ".
93 " content_type, visibility, content_long, content_is_lang_var, mob_id, playtime".
94 " FROM il_news_item ".
96 $ilDB->in(
"id", $a_ids,
false,
"integer"));
118 function importRecord($a_entity, $a_types, $a_rec, $a_mapping, $a_schema_version)
127 if ($a_rec[
"MobId"] > 0)
129 $mob_id = $a_mapping->getMapping(
"Services/MediaObjects",
"mob", $a_rec[
"MobId"]);
131 $c = (int)$a_rec[
"ContextObjId"].
":".$a_rec[
"ContextObjType"].
":".(
int)$a_rec[
"ContextSubObjId"].
132 ":".$a_rec[
"ContextSubObjType"];
133 $context = $a_mapping->getMapping(
"Services/News",
"news_context", $c);
134 $context = explode(
":", $context);
137 include_once(
"./Services/News/classes/class.ilNewsItem.php");
139 $newObj->setTitle($a_rec[
"Title"]);
140 $newObj->setContent($a_rec[
"Content"]);
141 $newObj->setPriority($a_rec[
"Priority"]);
142 $newObj->setContextObjId($context[0]);
143 $newObj->setContextObjType($context[1]);
144 $newObj->setContextSubObjId($context[2]);
145 $newObj->setContextSubObjType($context[3]);
146 $newObj->setContentType($a_rec[
"ContentType"]);
147 $newObj->setVisibility($a_rec[
"Visibility"]);
148 $newObj->setContentLong($a_rec[
"ContentLong"]);
149 $newObj->setContentIsLangVar($a_rec[
"ContentIsLangVar"]);
150 $newObj->setMobId($mob_id);
151 $newObj->setPlaytime($a_rec[
"Playtime"]);
153 $a_mapping->addMapping(
"Services/News",
"news", $a_rec[
"Id"], $newObj->getId());
readData($a_entity, $a_version, $a_ids, $a_field="")
Read data.
getDirectDataFromQuery($a_query, $a_convert_to_leading_upper=true, $a_set=true)
Get data from query.This is a standard procedure, all db field names are directly mapped to abstract ...
getXmlNamespace($a_entity, $a_schema_version)
Get xml namespace.
getSupportedVersions()
Get supported versions.
getTypes($a_entity, $a_version)
Get field types for entity.
Create styles array
The data for the language used.
getDependencies($a_entity, $a_version, $a_rec, $a_ids)
Determine the dependent sets of data.
A dataset contains in data in a common structure that can be shared and transformed for different pur...
importRecord($a_entity, $a_types, $a_rec, $a_mapping, $a_schema_version)
Import record.