36 bool $a_reference =
true
40 $this->log =
$DIC[
"ilLog"];
42 $objDefinition =
$DIC[
"objDefinition"];
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();
127 $obj_trans->withLanguage(
131 $this->getDescription(),
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
234 "SELECT " . $a_key .
" FROM itgr_data " .
235 " WHERE id = " .
$ilDB->quote($a_id,
"integer")
237 $rec =
$ilDB->fetchAssoc($set);
static _getInstance(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...
getDefaultLanguage()
Return default language.
ilObjectDefinition $obj_def
doCloneObject(ilObject2 $new_obj, int $a_target_id, ?int $a_copy_id=null)
doCreate(bool $clone_mode=false)
static lookupBehaviour(int $a_id)
ilItemGroupAR $item_data_ar
__construct(int $a_id=0, bool $a_reference=true)
Constructor.
setListPresentation(string $a_val)
cloneDependencies(int $a_target_id, int $a_copy_id)
Clone object dependencies.
static lookupHideTitle(int $a_id)
static fixContainerItemGroupRefsAfterCloning(ilContainer $a_source_container, int $a_copy_id)
setHideTitle(bool $a_val)
static lookup(int $a_id, string $a_key)
setBehaviour(int $a_val)
Set behaviour (see ilItemGroupBehaviour)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
parses the objects.xml it handles the xml-description of all ilias objects
getLongDescription()
get object long description (stored in object_description)
static _lookupObjId(int $ref_id)
setDescription(string $description)
static modifyItemGroupRefIdsByMapping(ilPageObject $a_page, array $mappings)
static _exists(string $a_parent_type, int $a_id, string $a_lang="", bool $a_no_cache=false)
Checks whether page exists.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc