4 include_once(
"./Services/DataSet/classes/class.ilDataSet.php");
23 return array(
"4.3.0",
"5.3.0");
34 return "http://www.ilias.de/xml/Modules/ItemGroup/" . $a_entity;
43 protected function getTypes($a_entity, $a_version)
45 if ($a_entity ==
"itgr") {
51 "Description" =>
"text");
55 "HideTitle" =>
"integer",
56 "Behaviour" =>
"integer",
58 "Description" =>
"text");
62 if ($a_entity ==
"itgr_item") {
67 "ItemGroupId" =>
"integer",
80 public function readData($a_entity, $a_version, $a_ids, $a_field =
"")
84 if (!is_array($a_ids)) {
85 $a_ids = array($a_ids);
88 if ($a_entity ==
"itgr") {
92 " FROM object_data " .
94 $ilDB->in(
"obj_id", $a_ids,
false,
"integer"));
98 " FROM object_data JOIN itgr_data ON (object_data.obj_id = itgr_data.id)" .
100 $ilDB->in(
"obj_id", $a_ids,
false,
"integer"));
106 if ($a_entity ==
"itgr_item") {
107 switch ($a_version) {
111 " FROM item_group_item " .
113 $ilDB->in(
"item_group_id", $a_ids,
false,
"integer"));
127 if ($a_entity ==
"itgr_item") {
142 "itgr_item" => array(
"ids" => $a_rec[
"Id"])
155 public function importRecord($a_entity, $a_types, $a_rec, $a_mapping, $a_schema_version)
159 include_once(
"./Modules/ItemGroup/classes/class.ilObjItemGroup.php");
161 if ($new_id = $a_mapping->getMapping(
'Services/Container',
'objs', $a_rec[
'Id'])) {
165 $newObj->setType(
"itgr");
166 $newObj->create(
true);
169 $newObj->setTitle($a_rec[
"Title"]);
170 $newObj->setDescription($a_rec[
"Description"]);
171 $newObj->setBehaviour($a_rec[
"Behaviour"]);
172 $newObj->setHideTitle($a_rec[
"HideTitle"]);
173 $newObj->update(
true);
174 $this->current_obj = $newObj;
175 $a_mapping->addMapping(
"Modules/ItemGroup",
"itgr", $a_rec[
"Id"], $newObj->getId());
180 if ($obj_id = $a_mapping->getMapping(
'Services/Container',
'objs', $a_rec[
'ItemId'])) {
182 include_once
'./Modules/ItemGroup/classes/class.ilItemGroupItems.php';
184 $itgri->setItemGroupId($this->current_obj->getId());
186 $itgri->addItem($ref_id);
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 ...
getSupportedVersions()
Get supported versions.
static _getAllReferences($a_id)
get all reference ids of object
Item group data set class.
getDependencies($a_entity, $a_version, $a_rec, $a_ids)
Determine the dependent sets of data.
static _lookupObjId($a_id)
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
importRecord($a_entity, $a_types, $a_rec, $a_mapping, $a_schema_version)
Import record.
getTypes($a_entity, $a_version)
Get field types for entity.
getXmlRecord($a_entity, $a_version, $a_set)
Get xml record (export)
A dataset contains in data in a common structure that can be shared and transformed for different pur...
getXmlNamespace($a_entity, $a_schema_version)
Get xml namespace.