5 require_once
"Services/Object/classes/class.ilObject2.php";
6 require_once
"Services/Object/classes/class.ilObjectActivation.php";
8 include_once(
"./Modules/ItemGroup/classes/class.ilItemGroupAR.php");
43 $this->log = $DIC[
"ilLog"];
44 $tree = $DIC->repositoryTree();
46 $ilDB = $DIC->database();
54 parent::__construct($a_id, $a_reference);
64 parent::setId($a_val);
65 $this->item_data_ar->setId($a_val);
83 $this->item_data_ar->setHideTitle($a_val);
93 return $this->item_data_ar->getHideTitle();
103 $this->item_data_ar->setBehaviour($a_val);
113 return $this->item_data_ar->getBehaviour();
129 if ($this->
getId()) {
130 $this->item_data_ar->setId($this->
getId());
131 $this->item_data_ar->create();
140 if ($this->
getId()) {
141 $this->item_data_ar->update();
150 if ($this->
getId()) {
151 $this->item_data_ar->delete();
162 protected function doCloneObject($new_obj, $a_target_id, $a_copy_id = null, $a_omit_tree =
false)
179 $ilLog->write(__METHOD__ .
': Cloning item group dependencies -' . $a_source_id .
'-');
181 parent::cloneDependencies($a_target_id, $a_copy_id);
183 include_once(
'./Modules/ItemGroup/classes/class.ilItemGroupItems.php');
185 $ig_items->cloneItems($this->
getRefId(), $a_copy_id);
202 $ilLog->write(__METHOD__ .
': Fix item group references in ' . $a_source_container->getType());
204 include_once(
'Services/CopyWizard/classes/class.ilCopyWizardOptions.php');
206 $mappings = $cwo->getMappings();
208 $new_container_ref_id = $mappings[$a_source_container->getRefId()];
209 $ilLog->write(__METHOD__ .
': 2-' . $new_container_ref_id .
'-');
212 include_once(
"./Services/COPage/classes/class.ilPageObject.php");
213 include_once(
"./Services/Container/classes/class.ilContainerPage.php");
214 $ilLog->write(__METHOD__ .
': 3' . $new_container_obj_id .
'-');
216 $ilLog->write(__METHOD__ .
': 4');
218 $new_page->buildDom();
219 include_once(
"./Services/COPage/classes/class.ilPCResources.php");
223 $ilLog->write(__METHOD__ .
': 5');
234 return self::lookup($a_id,
"hide_title");
245 return self::lookup($a_id,
"behaviour");
254 protected static function lookup($a_id, $a_key)
258 $ilDB = $DIC->database();
261 "SELECT " . $a_key .
" FROM itgr_data " .
262 " WHERE id = " .
$ilDB->quote($a_id,
"integer")
264 $rec =
$ilDB->fetchAssoc($set);
static lookupHideTitle($a_id)
Lookup hide title.
static _exists($a_parent_type, $a_id, $a_lang="", $a_no_cache=false)
Checks whether page exists.
__construct($a_id=0, $a_reference=true)
Constructor.
setHideTitle($a_val)
Set hide title.
static modifyItemGroupRefIdsByMapping($a_page, $mappings)
Modify ref ids by mapping.
static lookupBehaviour($a_id)
Lookup behaviour.
doCloneObject($new_obj, $a_target_id, $a_copy_id=null, $a_omit_tree=false)
Clone obj item group.
getBehaviour()
Get hide title.
static lookup($a_id, $a_key)
Lookup hide title.
static _getInstance($a_copy_id)
Get instance of copy wizard options.
static _lookupObjId($a_id)
getHideTitle()
Get hide title.
static fixContainerItemGroupRefsAfterCloning($a_source_container, $a_copy_id)
Fix container item group references after a container has been cloned.
setBehaviour($a_val)
Set behaviour (see ilItemGroupBehaviour)
Class ilObject2 This is an intermediate progress of ilObject class.
cloneDependencies($a_target_id, $a_copy_id)
Clone dependencies.
Item group active record class.