34 bool $a_reference =
true 38 $this->log = $DIC[
"ilLog"];
39 $tree = $DIC->repositoryTree();
40 $objDefinition = $DIC[
"objDefinition"];
41 $ilDB = $DIC->database();
44 $this->obj_def = $objDefinition;
52 public function setId($a_id): void
55 $this->item_data_ar->setId($a_id);
65 $this->item_data_ar->setHideTitle($a_val);
70 return $this->item_data_ar->getHideTitle();
78 $this->item_data_ar->setBehaviour($a_val);
83 return $this->item_data_ar->getListPresentation();
88 $this->item_data_ar->setListPresentation($a_val);
93 return $this->item_data_ar->getTileSize();
98 $this->item_data_ar->setTileSize($a_val);
103 return $this->item_data_ar->getBehaviour();
111 protected function doCreate(
bool $clone_mode =
false): void
115 if ($this->
getId()) {
116 $this->item_data_ar->setId($this->
getId());
117 $this->item_data_ar->create();
120 $lng = $DIC->language();
124 $obj_trans->addLanguage(
136 if ($this->
getId()) {
137 $this->item_data_ar->update();
140 $trans->setDefaultTitle($this->
getTitle());
148 if ($this->
getId()) {
149 $this->item_data_ar->delete();
164 $ot->copy($new_obj->
getId());
167 if ($ot2->getDefaultTitle() !==
"") {
168 $new_obj->
setTitle($ot2->getDefaultTitle());
170 if ($ot2->getDefaultDescription() !==
"") {
179 parent::cloneDependencies($a_target_id, $a_copy_id);
182 $ig_items->cloneItems($this->
getRefId(), $a_copy_id);
193 $ilLog = $DIC[
"ilLog"];
195 $ilLog->write(__METHOD__ .
': Fix item group references in ' . $a_source_container->
getType());
198 $mappings = $cwo->getMappings();
200 $new_container_ref_id = $mappings[$a_source_container->
getRefId()];
201 $ilLog->write(__METHOD__ .
': 2-' . $new_container_ref_id .
'-');
204 $ilLog->write(__METHOD__ .
': 3' . $new_container_obj_id .
'-');
206 $ilLog->write(__METHOD__ .
': 4');
208 $new_page->buildDom();
212 $ilLog->write(__METHOD__ .
': 5');
217 return (
bool) self::lookup($a_id,
"hide_title");
222 return (
int) self::lookup($a_id,
"behaviour");
225 protected static function lookup(
int $a_id,
string $a_key): string
229 $ilDB = $DIC->database();
232 "SELECT " . $a_key .
" FROM itgr_data " .
233 " WHERE id = " .
$ilDB->quote($a_id,
"integer")
235 $rec =
$ilDB->fetchAssoc($set);
setBehaviour(int $a_val)
Set behaviour (see ilItemGroupBehaviour)
getDefaultLanguage()
Return default language.
setListPresentation(string $a_val)
static lookupHideTitle(int $a_id)
static modifyItemGroupRefIdsByMapping(ilPageObject $a_page, array $mappings)
static _lookupObjId(int $ref_id)
setDescription(string $desc)
parses the objects.xml it handles the xml-description of all ilias objects
setHideTitle(bool $a_val)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _exists(string $a_parent_type, int $a_id, string $a_lang="", bool $a_no_cache=false)
Checks whether page exists.
ilObjectDefinition $obj_def
static getInstance(int $obj_id)
cloneDependencies(int $a_target_id, int $a_copy_id)
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...
static lookupBehaviour(int $a_id)
doCreate(bool $clone_mode=false)
static fixContainerItemGroupRefsAfterCloning(ilContainer $a_source_container, int $a_copy_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(int $a_id=0, bool $a_reference=true)
__construct(Container $dic, ilPlugin $plugin)
getLongDescription()
get object long description (stored in object_description)
doCloneObject(ilObject2 $new_obj, int $a_target_id, ?int $a_copy_id=null)
static _getInstance(int $a_copy_id)
ilItemGroupAR $item_data_ar
static lookup(int $a_id, string $a_key)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...