36 bool $a_reference =
true 40 $this->log = $DIC[
"ilLog"];
41 $tree = $DIC->repositoryTree();
42 $objDefinition = $DIC[
"objDefinition"];
43 $ilDB = $DIC->database();
46 $this->obj_def = $objDefinition;
54 public function setId($a_id): void
57 $this->item_data_ar->setId($a_id);
67 $this->item_data_ar->setHideTitle($a_val);
72 return $this->item_data_ar->getHideTitle();
80 $this->item_data_ar->setBehaviour($a_val);
85 return $this->item_data_ar->getListPresentation();
90 $this->item_data_ar->setListPresentation($a_val);
95 return $this->item_data_ar->getTileSize();
100 $this->item_data_ar->setTileSize($a_val);
105 return $this->item_data_ar->getBehaviour();
113 protected function doCreate(
bool $clone_mode =
false): void
117 if ($this->
getId()) {
118 $this->item_data_ar->setId($this->
getId());
119 $this->item_data_ar->create();
122 $lng = $DIC->language();
127 $obj_trans->withLanguage(
140 if ($this->
getId()) {
141 $this->item_data_ar->update();
145 ->withDefaultTitle($this->
getTitle())
153 if ($this->
getId()) {
154 $this->item_data_ar->delete();
169 if ($ot->getDefaultTitle() !==
"") {
170 $new_obj->
setTitle($ot->getDefaultTitle());
172 if ($ot->getDefaultDescription() !==
"") {
181 parent::cloneDependencies($a_target_id, $a_copy_id);
184 $ig_items->cloneItems($this->
getRefId(), $a_copy_id);
195 $ilLog = $DIC[
"ilLog"];
197 $ilLog->write(__METHOD__ .
': Fix item group references in ' . $a_source_container->
getType());
200 $mappings = $cwo->getMappings();
202 $new_container_ref_id = $mappings[$a_source_container->
getRefId()];
203 $ilLog->write(__METHOD__ .
': 2-' . $new_container_ref_id .
'-');
206 $ilLog->write(__METHOD__ .
': 3' . $new_container_obj_id .
'-');
208 $ilLog->write(__METHOD__ .
': 4');
210 $new_page->buildDom();
214 $ilLog->write(__METHOD__ .
': 5');
219 return (
bool) self::lookup($a_id,
"hide_title");
224 return (
int) self::lookup($a_id,
"behaviour");
227 protected static function lookup(
int $a_id,
string $a_key): string
231 $ilDB = $DIC->database();
234 "SELECT " . $a_key .
" FROM itgr_data " .
235 " WHERE id = " .
$ilDB->quote($a_id,
"integer")
237 $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)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
setHideTitle(bool $a_val)
static _exists(string $a_parent_type, int $a_id, string $a_lang="", bool $a_no_cache=false)
Checks whether page exists.
ilObjectDefinition $obj_def
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...
static lookupBehaviour(int $a_id)
doCreate(bool $clone_mode=false)
static fixContainerItemGroupRefsAfterCloning(ilContainer $a_source_container, int $a_copy_id)
__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)
setDescription(string $description)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...