ILIAS  release_4-4 Revision
ilObjItemGroup Class Reference

Class ilObjItemGroup. More...

+ Inheritance diagram for ilObjItemGroup:
+ Collaboration diagram for ilObjItemGroup:

Public Member Functions

 __construct ($a_id=0, $a_reference=true)
 Constructor. More...
 
 initType ()
 Init type. More...
 
 cloneDependencies ($a_target_id, $a_copy_id)
 Clone dependencies. More...
 
- Public Member Functions inherited from ilObject2
 __construct ($a_id=0, $a_reference=true)
 Constructor public. More...
 
 withReferences ()
 
 read ($a_force_db=false)
 Read data from db. More...
 
 getId ()
 
 setId ($a_id)
 
 setRefId ($a_id)
 
 getRefId ()
 
 getType ()
 
 setType ($a_type)
 
 getPresentationTitle ()
 
 getTitle ()
 
 getUntranslatedTitle ()
 
 setTitle ($a_title)
 
 getDescription ()
 
 setDescription ($a_desc)
 
 getLongDescription ()
 
 getImportId ()
 
 setImportId ($a_import_id)
 
 getOwner ()
 
 getOwnerName ()
 
 _lookupOwnerName ($a_owner_id)
 
 setOwner ($a_owner)
 
 getCreateDate ()
 
 getLastUpdateDate ()
 
 setObjDataRecord ($a_record)
 
 create ($a_clone_mode=false)
 
 update ()
 
 MDUpdateListener ($a_element)
 
 createMetaData ()
 
 updateMetaData ()
 
 deleteMetaData ()
 
 updateOwner ()
 
 _getIdForImportId ($a_import_id)
 
 _lookupOwner ($a_id)
 
 _lookupLastUpdate ($a_id, $a_as_string=false)
 
 _getLastUpdateOfObjects ($a_objs)
 
 _setDeletedDate ($a_ref_id)
 
 _resetDeletedDate ($a_ref_id)
 
 _lookupDeletedDate ($a_ref_id)
 
 _writeTitle ($a_obj_id, $a_title)
 
 _writeDescription ($a_obj_id, $a_desc)
 
 _writeImportId ($a_obj_id, $a_import_id)
 
 _isInTrash ($a_ref_id)
 
 _hasUntrashedReference ($a_obj_id)
 
 _getObjectsDataForType ($a_type, $a_omit_trash=false)
 
 putInTree ($a_parent_ref)
 
 setPermissions ($a_parent_ref)
 
 createReference ()
 
 countReferences ()
 
 delete ()
 
 initDefaultRoles ()
 
 createRoleFolder ()
 
 notify ($a_event, $a_ref_id, $a_parent_non_rbac_id, $a_node_id, $a_params=0)
 
 setRegisterMode ($a_bool)
 
 isUserRegistered ($a_user_id=0)
 
 requireRegistration ()
 
 appendCopyInfo ($a_target_id, $a_copy_id)
 
 cloneMetaData ($target_obj)
 
 cloneObject ($a_target_id, $a_copy_id=null, $a_omit_tree=false)
 
 cloneDependencies ($a_target_id, $a_copy_id)
 
- Public Member Functions inherited from ilObject
 ilObject ($a_id=0, $a_reference=true)
 Constructor public. More...
 
 withReferences ()
 determines wehter objects are referenced or not (got ref ids or not) More...
 
 read ($a_force_db=false)
 read object data from db into object More...
 
 getId ()
 get object id public More...
 
 setId ($a_id)
 set object id public More...
 
 setRefId ($a_id)
 set reference id public More...
 
 getRefId ()
 get reference id public More...
 
 getType ()
 get object type public More...
 
 setType ($a_type)
 set object type public More...
 
 getPresentationTitle ()
 get presentation title Normally same as title Overwritten for sessions More...
 
 getTitle ()
 get object title public More...
 
 getUntranslatedTitle ()
 get untranslated object title public More...
 
 setTitle ($a_title)
 set object title More...
 
 getDescription ()
 get object description More...
 
 setDescription ($a_desc)
 set object description More...
 
 getLongDescription ()
 get object long description (stored in object_description) More...
 
 getImportId ()
 get import id More...
 
 setImportId ($a_import_id)
 set import id More...
 
 getOwner ()
 get object owner More...
 
 getOwnerName ()
 
 _lookupOwnerName ($a_owner_id)
 lookup owner name for owner id More...
 
 setOwner ($a_owner)
 set object owner More...
 
 getCreateDate ()
 get create date public More...
 
 getLastUpdateDate ()
 get last update date public More...
 
 getDiskUsage ()
 Gets the disk usage of the object in bytes. More...
 
 setObjDataRecord ($a_record)
 set object_data record (note: this method should only be called from the ilObjectFactory class) More...
 
 create ()
 create More...
 
 update ()
 update object in db More...
 
 MDUpdateListener ($a_element)
 Meta data update listener. More...
 
 createMetaData ()
 create meta data entry More...
 
 updateMetaData ()
 update meta data entry More...
 
 deleteMetaData ()
 delete meta data entry More...
 
 updateOwner ()
 update owner of object in db More...
 
 _getIdForImportId ($a_import_id)
 get current object id for import id (static) More...
 
 _lookupOwner ($a_id)
 lookup object owner More...
 
 _lookupLastUpdate ($a_id, $a_as_string=false)
 lookup last update More...
 
 _getLastUpdateOfObjects ($a_objs)
 Get last update for a set of media objects. More...
 
 _setDeletedDate ($a_ref_id)
 only called in ilTree::saveSubTree More...
 
 _resetDeletedDate ($a_ref_id)
 only called in ilObjectGUI::insertSavedNodes More...
 
 _lookupDeletedDate ($a_ref_id)
 only called in ilObjectGUI::insertSavedNodes More...
 
 _writeTitle ($a_obj_id, $a_title)
 write title to db (static) More...
 
 _writeDescription ($a_obj_id, $a_desc)
 write description to db (static) More...
 
 _writeImportId ($a_obj_id, $a_import_id)
 write import id to db (static) More...
 
 _isInTrash ($a_ref_id)
 checks wether object is in trash More...
 
 _hasUntrashedReference ($a_obj_id)
 checks wether an object has at least one reference that is not in trash More...
 
 _getObjectsDataForType ($a_type, $a_omit_trash=false)
 get all objects of a certain type More...
 
 putInTree ($a_parent_ref)
 maybe this method should be in tree object!? More...
 
 setPermissions ($a_parent_ref)
 set permissions of object More...
 
 createReference ()
 creates reference for object More...
 
 countReferences ()
 count references of object More...
 
 delete ()
 delete object or referenced object (in the case of a referenced object, object data is only deleted if last reference is deleted) This function removes an object entirely from system!! More...
 
 initDefaultRoles ()
 init default roles settings Purpose of this function is to create a local role folder and local roles, that are needed depending on the object type If you want to setup default local roles you MUST overwrite this method in derived object classes (see ilObjForum for an example) public More...
 
 createRoleFolder ()
 creates a local role folder More...
 
 applyDidacticTemplate ($a_tpl_id)
 Apply template. More...
 
 notify ($a_event, $a_ref_id, $a_parent_non_rbac_id, $a_node_id, $a_params=0)
 notifys an object about an event occured Based on the event passed, each object may decide how it reacts. More...
 
 setRegisterMode ($a_bool)
 
 isUserRegistered ($a_user_id=0)
 
 requireRegistration ()
 
 getXMLZip ()
 
 getHTMLDirectory ()
 
 cloneObject ($a_target_id, $a_copy_id=0, $a_omit_tree=false)
 Clone object permissions, put in tree ... More...
 
 appendCopyInfo ($a_target_id, $a_copy_id)
 Prepend Copy info if object with same name exists in that container. More...
 
 cloneDependencies ($a_target_id, $a_copy_id)
 Clone object dependencies. More...
 
 cloneMetaData ($target_obj)
 Copy meta data. More...
 
 _lookupCreationDate ($a_id)
 Lookup creation date. More...
 

Static Public Member Functions

static fixContainerItemGroupRefsAfterCloning ($a_source_container, $a_copy_id)
 Fix container item group references after a container has been cloned. More...
 
- Static Public Member Functions inherited from ilObject2
static _lookupObjIdByImportId ($a_import_id)
 
static _getAllReferences ($a_id)
 
static _lookupTitle ($a_id)
 
static _getIdsForTitle ($title, $type='', $partialmatch=false)
 
static _lookupDescription ($a_id)
 
static _lookupObjId ($a_id)
 
static _lookupType ($a_id, $a_reference=false)
 
static _lookupObjectId ($a_ref_id)
 
static _exists ($a_id, $a_reference=false)
 
static _getObjectsByType ($a_obj_type="", $a_owner="")
 
static _prepareCloneSelection ($a_ref_ids, $new_type)
 
static _getIcon ($a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
 
- Static Public Member Functions inherited from ilObject
static _lookupObjIdByImportId ($a_import_id)
 
static _getAllReferences ($a_id)
 get all reference ids of object More...
 
static _lookupTitle ($a_id)
 lookup object title More...
 
static _getIdsForTitle ($title, $type='', $partialmatch=false)
 
static _lookupDescription ($a_id)
 lookup object description More...
 
static _lookupObjId ($a_id)
 
static setDeletedDates ($a_ref_ids)
 Set deleted date type $ilDB. More...
 
static _lookupType ($a_id, $a_reference=false)
 lookup object type More...
 
static _lookupObjectId ($a_ref_id)
 lookup object id More...
 
static _exists ($a_id, $a_reference=false, $a_type=null)
 checks if an object exists in object_data More...
 
static _getObjectsByType ($a_obj_type="", $a_owner="")
 Get objects by type. More...
 
static _prepareCloneSelection ($a_ref_ids, $new_type, $show_path=true)
 Prepare copy wizard object selection. More...
 
static _getIcon ($a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
 Get icon for repository item. More...
 
static collectDeletionDependencies (&$deps, $a_ref_id, $a_obj_id, $a_type, $a_depth=0)
 Collect deletion dependencies. More...
 
static getDeletionDependencies ($a_obj_id)
 Get deletion dependencies. More...
 
static getLongDescriptions (array $a_obj_ids)
 Get long description data. More...
 
static getAllOwnedRepositoryObjects ($a_user_id)
 Get all ids of objects user owns. More...
 
static hasAutoRating ($a_type, $a_ref_id)
 Check if auto rating is active for parent group/course. More...
 

Protected Member Functions

 doRead ()
 Read. More...
 
 propertiesToDB ()
 Get properties array. More...
 
 doCreate ()
 Creation. More...
 
 doUpdate ()
 Update. More...
 
 doDelete ()
 Deletion. More...
 
 doCloneObject ($new_obj, $a_target_id, $a_copy_id)
 Clone obj item group. More...
 
- Protected Member Functions inherited from ilObject2
 initType ()
 
 doRead ()
 
 doCreate ()
 
 beforeCreate ()
 
 doUpdate ()
 
 beforeUpdate ()
 
 doMDUpdateListener ($a_element)
 
 beforeMDUpdateListener ($a_element)
 
 doCreateMetaData ()
 
 beforeCreateMetaData ()
 
 doUpdateMetaData ()
 
 beforeUpdateMetaData ()
 
 doDelete ()
 
 beforeDelete ()
 
 doCloneObject ($new_obj, $a_target_id, $a_copy_id=null)
 
 beforeCloneObject ()
 

Protected Attributes

 $access_type
 
 $access_begin
 
 $access_end
 
 $access_visibility
 

Additional Inherited Members

- Data Fields inherited from ilObject
const TITLE_LENGTH = 255
 max length of object title More...
 
const DESC_LENGTH = 128
 
 $ilias
 
 $lng
 
 $id
 
 $ref_id
 
 $type
 
 $title
 
 $untranslatedTitle
 
 $desc
 
 $long_desc
 
 $owner
 
 $create_date
 
 $last_update
 
 $import_id
 
 $register = false
 
 $referenced
 
 $objectList
 
 $max_title
 
 $max_desc
 
 $add_dots
 
 $obj_data_record
 object_data record More...
 

Detailed Description

Class ilObjItemGroup.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

Definition at line 16 of file class.ilObjItemGroup.php.

Constructor & Destructor Documentation

◆ __construct()

ilObjItemGroup::__construct (   $a_id = 0,
  $a_reference = true 
)

Constructor.

Parameters
int$a_idid
bool$a_referenceref id?
Returns

Definition at line 30 of file class.ilObjItemGroup.php.

31  {
32  global $tree, $objDefinition;
33 
34  $this->tree = $tree;
35  $this->obj_def = $objDefinition;
36 
37  parent::__construct($a_id, $a_reference);
38  }

Member Function Documentation

◆ cloneDependencies()

ilObjItemGroup::cloneDependencies (   $a_target_id,
  $a_copy_id 
)

Clone dependencies.

Parameters

Definition at line 165 of file class.ilObjItemGroup.php.

References $ilLog, and ilObject2\getRefId().

166  {
167  global $ilLog;
168 
169  $ilLog->write(__METHOD__.': Cloning item group dependencies -'.$a_source_id.'-');
170 
171  parent::cloneDependencies($a_target_id,$a_copy_id);
172 
173  include_once('./Modules/ItemGroup/classes/class.ilItemGroupItems.php');
174  $ig_items = new ilItemGroupItems($a_target_id);
175  $ig_items->cloneItems($this->getRefId(), $a_copy_id);
176 
177  return true;
178  }
Item group items.
+ Here is the call graph for this function:

◆ doCloneObject()

ilObjItemGroup::doCloneObject (   $new_obj,
  $a_target_id,
  $a_copy_id 
)
protected

Clone obj item group.

Parameters

Definition at line 154 of file class.ilObjItemGroup.php.

155  {
156 
157  }

◆ doCreate()

ilObjItemGroup::doCreate ( )
protected

Creation.

Definition at line 83 of file class.ilObjItemGroup.php.

References ilObject2\getId(), and propertiesToDB().

84  {
85  global $ilDB;
86 
87  if($this->getId())
88  {
89  $fields = $this->propertiesToDB();
90 // $fields["id"] = array("integer", $this->getId());
91 
92 // $ilDB->insert("il_poll", $fields);
93 
94 
95  // object activation default entry will be created on demand
96 
97 
98  }
99  }
propertiesToDB()
Get properties array.
+ Here is the call graph for this function:

◆ doDelete()

ilObjItemGroup::doDelete ( )
protected

Deletion.

Definition at line 132 of file class.ilObjItemGroup.php.

References ilObject2\getId().

133  {
134  global $ilDB;
135 
136  if($this->getId())
137  {
138  if($this->ref_id)
139  {
140 // ilObjectActivation::deleteAllEntries($this->ref_id);
141  }
142 
143 // $ilDB->manipulate("DELETE FROM il_poll".
144 // " WHERE id = ".$ilDB->quote($this->id, "integer"));
145  }
146  }
+ Here is the call graph for this function:

◆ doRead()

ilObjItemGroup::doRead ( )
protected

Read.

Definition at line 51 of file class.ilObjItemGroup.php.

52  {
53  global $ilDB;
54 
55  /*$set = $ilDB->query("SELECT * FROM il_poll".
56  " WHERE id = ".$ilDB->quote($this->getId(), "integer"));
57  $row = $ilDB->fetchAssoc($set);*/
58 
59  if ($this->ref_id)
60  {
61 /* $activation = ilObjectActivation::getItem($this->ref_id);
62  $this->setAccessType($activation["timing_type"]);
63  $this->setAccessBegin($activation["timing_start"]);
64  $this->setAccessEnd($activation["timing_end"]);
65  $this->setAccessVisibility($activation["visible"]);*/
66  }
67  }

◆ doUpdate()

ilObjItemGroup::doUpdate ( )
protected

Update.

Definition at line 104 of file class.ilObjItemGroup.php.

References ilObject2\getId(), and propertiesToDB().

105  {
106  global $ilDB;
107 
108  if($this->getId())
109  {
110  $fields = $this->propertiesToDB();
111 
112 // $ilDB->update("il_poll", $fields,
113 // array("id"=>array("integer", $this->getId())));
114 
115 
116  if($this->ref_id)
117  {
118 /* $activation = new ilObjectActivation();
119  $activation->setTimingType($this->getAccessType());
120  $activation->setTimingStart($this->getAccessBegin());
121  $activation->setTimingEnd($this->getAccessEnd());
122  $activation->toggleVisible($this->getAccessVisibility());
123  $activation->update($this->ref_id);*/
124  }
125 
126  }
127  }
propertiesToDB()
Get properties array.
+ Here is the call graph for this function:

◆ fixContainerItemGroupRefsAfterCloning()

static ilObjItemGroup::fixContainerItemGroupRefsAfterCloning (   $a_source_container,
  $a_copy_id 
)
static

Fix container item group references after a container has been cloned.

Parameters

Definition at line 186 of file class.ilObjItemGroup.php.

References $ilLog, ilPageObject\_exists(), ilCopyWizardOptions\_getInstance(), ilObject\_lookupObjId(), and ilPCResources\modifyItemGroupRefIdsByMapping().

Referenced by ilContainer\cloneDependencies().

187  {
188  global $ilLog;
189 
190  $ilLog->write(__METHOD__.': Fix item group references in '.$a_source_container->getType());
191 
192  include_once('Services/CopyWizard/classes/class.ilCopyWizardOptions.php');
193  $cwo = ilCopyWizardOptions::_getInstance($a_copy_id);
194  $mappings = $cwo->getMappings();
195 
196  $new_container_ref_id = $mappings[$a_source_container->getRefId()];
197  $ilLog->write(__METHOD__.': 2-'.$new_container_ref_id.'-');
198  $new_container_obj_id = ilObject::_lookupObjId($new_container_ref_id);
199 
200  include_once("./Services/COPage/classes/class.ilPageObject.php");
201  include_once("./Services/Container/classes/class.ilContainerPage.php");
202  $ilLog->write(__METHOD__.': 3'.$new_container_obj_id.'-');
203  if (ilPageObject::_exists("cont", $new_container_obj_id))
204  {
205  $ilLog->write(__METHOD__.': 4');
206  $new_page = new ilContainerPage($new_container_obj_id);
207  $new_page->buildDom();
208  include_once("./Services/COPage/classes/class.ilPCResources.php");
209  ilPCResources::modifyItemGroupRefIdsByMapping($new_page, $mappings);
210  $new_page->update();
211  }
212  $ilLog->write(__METHOD__.': 5');
213  }
static modifyItemGroupRefIdsByMapping($a_page, $mappings)
Modify ref ids by mapping.
static _getInstance($a_copy_id)
Get instance of copy wizard options.
static _exists($a_parent_type, $a_id, $a_lang="")
Checks whether page exists.
Container page object.
static _lookupObjId($a_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initType()

ilObjItemGroup::initType ( )

Init type.

Definition at line 43 of file class.ilObjItemGroup.php.

44  {
45  $this->type = "itgr";
46  }

◆ propertiesToDB()

ilObjItemGroup::propertiesToDB ( )
protected

Get properties array.

Definition at line 72 of file class.ilObjItemGroup.php.

Referenced by doCreate(), and doUpdate().

73  {
74  $fields = array(
75  );
76 
77  return $fields;
78  }
+ Here is the caller graph for this function:

Field Documentation

◆ $access_begin

ilObjItemGroup::$access_begin
protected

Definition at line 19 of file class.ilObjItemGroup.php.

◆ $access_end

ilObjItemGroup::$access_end
protected

Definition at line 20 of file class.ilObjItemGroup.php.

◆ $access_type

ilObjItemGroup::$access_type
protected

Definition at line 18 of file class.ilObjItemGroup.php.

◆ $access_visibility

ilObjItemGroup::$access_visibility
protected

Definition at line 21 of file class.ilObjItemGroup.php.


The documentation for this class was generated from the following file: