ILIAS  release_7 Revision v7.30-3-g800a261c036
ilObjDataCollection Class Reference

Class ilObjDataCollection. More...

+ Inheritance diagram for ilObjDataCollection:
+ Collaboration diagram for ilObjDataCollection:

Public Member Functions

 initType ()
 
 doRead ()
 
 doClone ()
 
 doUpdate ()
 
 reorderTables ($table_order)
 
 doCloneObject ($new_obj, $a_target_id, $a_copy_id=null, $a_omit_tree=false)
 Clone DCL. More...
 
 cloneStructure ($original_id)
 Attention only use this for objects who have not yet been created (use like: $x = new ilObjDataCollection; $x->cloneStructure($id)) More...
 
 setOnline ($a_val)
 setOnline More...
 
 getOnline ()
 getOnline More...
 
 setRating ($a_val)
 setRating More...
 
 getRating ()
 getRating More...
 
 setPublicNotes ($a_val)
 setPublicNotes More...
 
 getPublicNotes ()
 getPublicNotes More...
 
 setApproval ($a_val)
 setApproval More...
 
 getApproval ()
 getApproval More...
 
 setNotification ($a_val)
 setNotification More...
 
 getNotification ()
 getNotification More...
 
 getTables ()
 
 getTableById ($table_id)
 
 getVisibleTables ()
 
 getStyleSheetId ()
 
 prepareMessageText (string $body)
 
- Public Member Functions inherited from ilObject2
 __construct ($a_id=0, $a_reference=true)
 Constructor @access public. More...
 
 withReferences ()
 determines wehter objects are referenced or not (got ref ids or not) More...
 
 read ()
 Read data from db. More...
 
 setRefId ($a_id)
 set reference id @access public More...
 
 getRefId ()
 get reference id @access public More...
 
 getType ()
 get object type @access public More...
 
 setType ($a_type)
 set object type @access public More...
 
 getPresentationTitle ()
 get presentation title Normally same as title Overwritten for sessions More...
 
 getTitle ()
 get object title @access public More...
 
 getUntranslatedTitle ()
 get untranslated object title @access 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 ()
 
 setOwner ($a_owner)
 set object owner More...
 
 getCreateDate ()
 get create date @access public More...
 
 getLastUpdateDate ()
 get last update date @access public More...
 
 create ($a_clone_mode=false)
 
 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...
 
 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) @access public More...
 
 setRegisterMode ($a_bool)
 
 isUserRegistered ($a_user_id=0)
 
 requireRegistration ()
 
 appendCopyInfo ($a_target_id, $a_copy_id)
 Prepend Copy info if object with same name exists in that container. More...
 
 cloneMetaData ($target_obj)
 Copy meta data. More...
 
 cloneObject ($a_target_id, $a_copy_id=null, $a_omit_tree=false)
 
 cloneDependencies ($a_target_id, $a_copy_id)
 Clone object dependencies. More...
 
- Public Member Functions inherited from ilObject
 __construct ($a_id=0, $a_reference=true)
 Constructor @access public. More...
 
 withReferences ()
 determines wehter objects are referenced or not (got ref ids or not) More...
 
 read ()
 read object data from db into object More...
 
 getId ()
 get object id @access public More...
 
 setId ($a_id)
 set object id @access public More...
 
 setRefId ($a_id)
 set reference id @access public More...
 
 getRefId ()
 get reference id @access public More...
 
 getType ()
 get object type @access public More...
 
 setType ($a_type)
 set object type @access public More...
 
 getPresentationTitle ()
 get presentation title Normally same as title Overwritten for sessions More...
 
 getTitle ()
 get object title @access public More...
 
 getUntranslatedTitle ()
 get untranslated object title @access 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...
 
 setOfflineStatus ($a_status)
 Set offline status. More...
 
 getOfflineStatus ()
 Get offline status. More...
 
 supportsOfflineHandling ()
 Check whether object supports offline handling. More...
 
 getOwner ()
 get object owner More...
 
 getOwnerName ()
 
 setOwner ($a_owner)
 set object owner More...
 
 getCreateDate ()
 get create date @access public More...
 
 getLastUpdateDate ()
 get last update date @access public More...
 
 getDiskUsage ()
 Gets the disk usage of the object in bytes. 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...
 
 putInTree ($a_parent_ref)
 maybe this method should be in tree object!? More...
 
 setPermissions ($a_parent_ref)
 set permissions of object More...
 
 setParentRolePermissions ($a_parent_ref)
 Initialize the permissions of parent roles (local roles of categories, global roles...) This method is overwritten in e.g courses, groups for building permission intersections with non_member templates. 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) @access public More...
 
 applyDidacticTemplate ($a_tpl_id)
 Apply template. More...
 
 setRegisterMode ($a_bool)
 
 isUserRegistered ($a_user_id=0)
 
 requireRegistration ()
 
 getXMLZip ()
 
 getHTMLDirectory ()
 
 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...
 
 getPossibleSubObjects ($a_filter=true)
 get all possible subobjects of this type the object can decide which types of subobjects are possible jut in time overwrite if the decision distinguish from standard model More...
 

Static Public Member Functions

static _hasWriteAccess ($ref)
 
static _hasReadAccess ($ref)
 
static _hasTableByTitle ($title, $obj_id)
 Checks if a DataCollection has a table with a given title. More...
 
- Static Public Member Functions inherited from ilObject2
static _lookupObjIdByImportId ($a_import_id)
 
static _lookupOwnerName ($a_owner_id)
 lookup owner name for owner id More...
 
static _getIdForImportId ($a_import_id)
 get current object id for import id (static) More...
 
static _getAllReferences ($a_id)
 get all reference ids of object More...
 
static _lookupTitle ($a_id)
 lookup object title More...
 
static _lookupOwner ($a_id)
 lookup object owner More...
 
static _getIdsForTitle ($title, $type='', $partialmatch=false)
 
static _lookupDescription ($a_id)
 lookup object description More...
 
static _lookupLastUpdate ($a_id, $a_as_string=false)
 lookup last update More...
 
static _getLastUpdateOfObjects ($a_objs)
 Get last update for a set of media objects. More...
 
static _lookupObjId ($a_id)
 
static _setDeletedDate ($a_ref_id, $a_deleted_by)
 
static _resetDeletedDate ($a_ref_id)
 only called in ilObjectGUI::insertSavedNodes More...
 
static _lookupDeletedDate ($a_ref_id)
 only called in ilObjectGUI::insertSavedNodes More...
 
static _writeTitle ($a_obj_id, $a_title)
 write title to db (static) More...
 
static _writeDescription ($a_obj_id, $a_desc)
 write description to db (static) More...
 
static _writeImportId ($a_obj_id, $a_import_id)
 write import id to db (static) More...
 
static _lookupType ($a_id, $a_reference=false)
 lookup object type More...
 
static _isInTrash ($a_ref_id)
 checks wether object is in trash More...
 
static _hasUntrashedReference ($a_obj_id)
 checks wether an object has at least one reference that is not in trash More...
 
static _lookupObjectId ($a_ref_id)
 lookup object id More...
 
static _getObjectsDataForType ($a_type, $a_omit_trash=false)
 get all objects of a certain type More...
 
static _exists ($a_id, $a_reference=false, $a_type=null)
 checks if an object exists in object_data@access public More...
 
static _getObjectsByType ($a_obj_type="", $a_owner="")
 Get objects by type. More...
 
static _prepareCloneSelection ($a_ref_ids, $new_type, $a_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 Public Member Functions inherited from ilObject
static _lookupObjIdByImportId ($a_import_id)
 
static _lookupImportId ($a_obj_id)
 
static _lookupOwnerName ($a_owner_id)
 lookup owner name for owner id More...
 
static _getIdForImportId ($a_import_id)
 get current object id for import id (static) More...
 
static _getAllReferences ($a_id)
 get all reference ids of object More...
 
static _lookupTitle ($a_id)
 lookup object title More...
 
static lookupOfflineStatus ($a_obj_id)
 Lookup offline status using objectDataCache. More...
 
static _lookupOwner ($a_id)
 lookup object owner More...
 
static _getIdsForTitle ($title, $type='', $partialmatch=false)
 
static _lookupDescription ($a_id)
 lookup object description More...
 
static _lookupLastUpdate ($a_id, $a_as_string=false)
 lookup last update More...
 
static _getLastUpdateOfObjects ($a_objs)
 Get last update for a set of media objects. More...
 
static _lookupObjId ($a_id)
 
static _setDeletedDate ($a_ref_id, $a_deleted_by)
 
static setDeletedDates ($a_ref_ids, $a_user_id)
 Set deleted date. More...
 
static _resetDeletedDate ($a_ref_id)
 only called in ilObjectGUI::insertSavedNodes More...
 
static _lookupDeletedDate ($a_ref_id)
 only called in ilObjectGUI::insertSavedNodes More...
 
static _writeTitle ($a_obj_id, $a_title)
 write title to db (static) More...
 
static _writeDescription ($a_obj_id, $a_desc)
 write description to db (static) More...
 
static _writeImportId ($a_obj_id, $a_import_id)
 write import id to db (static) More...
 
static _lookupType ($a_id, $a_reference=false)
 lookup object type More...
 
static _isInTrash ($a_ref_id)
 checks wether object is in trash More...
 
static _hasUntrashedReference ($a_obj_id)
 checks wether an object has at least one reference that is not in trash More...
 
static _lookupObjectId ($a_ref_id)
 lookup object id More...
 
static _getObjectsDataForType ($a_type, $a_omit_trash=false)
 get all objects of a certain type More...
 
static _exists ($a_id, $a_reference=false, $a_type=null)
 checks if an object exists in object_data@access public 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 fixMissingTitles ($a_type, array &$a_obj_title_map)
 Try to fix missing object titles. More...
 
static _lookupCreationDate ($a_id)
 Lookup creation date. More...
 
static hasAutoRating ($a_type, $a_ref_id)
 Check if auto rating is active for parent group/course. More...
 

Protected Member Functions

 doCreate ($clone_mode=false)
 
 doDelete ()
 
- Protected Member Functions inherited from ilObject2
 initType ()
 
 doRead ()
 
 doCreate ()
 
 beforeCreate ()
 If overwritten this method should return true, there is currently no "abort" handling for cases where "false" is returned. More...
 
 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 ()
 

Additional Inherited Members

- Data Fields inherited from ilObject
const TITLE_LENGTH = 255
 max length of object title More...
 
const DESC_LENGTH = 128
 
 $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
 
- Protected Attributes inherited from ilObject
 $objDefinition
 
 $db
 
 $log
 
 $error
 
 $tree
 
 $app_event_handler
 
 $rbacadmin
 
 $rbacreview
 

Detailed Description

Class ilObjDataCollection.

Author
Jörg Lützenkirchen luetz.nosp@m.enki.nosp@m.rchen.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Fabian Schmid fs@st.nosp@m.uder.nosp@m.-raim.nosp@m.ann..nosp@m.ch
Version
Id
class.ilObjFolder.php 25528 2010-09-03 10:37:11Z smeyer

Definition at line 15 of file class.ilObjDataCollection.php.

Member Function Documentation

◆ _hasReadAccess()

static ilObjDataCollection::_hasReadAccess (   $ref)
static
Parameters
$refint the reference id of the datacollection object to check.
Returns
bool whether or not the current user has add/edit_entry access to the referenced datacollection
Deprecated:

Definition at line 479 of file class.ilObjDataCollection.php.

480 {
482 }

References ilObjDataCollectionAccess\hasReadAccess().

+ Here is the call graph for this function:

◆ _hasTableByTitle()

static ilObjDataCollection::_hasTableByTitle (   $title,
  $obj_id 
)
static

Checks if a DataCollection has a table with a given title.

Parameters
$titleTitle of table
$obj_idObj-ID of the table
Returns
bool

Definition at line 536 of file class.ilObjDataCollection.php.

537 {
538 global $DIC;
539 $ilDB = $DIC['ilDB'];
540 $result = $ilDB->query(
541 'SELECT * FROM il_dcl_table WHERE obj_id = ' . $ilDB->quote($obj_id, 'integer') . ' AND title = '
542 . $ilDB->quote($title, 'text')
543 );
544
545 return ($ilDB->numRows($result)) ? true : false;
546 }
$result
return true
Flag indicating whether or not HTTP headers will be sent when outputting captcha image/audio.
global $DIC
Definition: goto.php:24
global $ilDB

References $DIC, $ilDB, $result, ilObject\$title, and true.

Referenced by ilDclTableEditGUI\checkInput().

+ Here is the caller graph for this function:

◆ _hasWriteAccess()

static ilObjDataCollection::_hasWriteAccess (   $ref)
static
Parameters
$refint the reference id of the datacollection object to check.
Returns
bool whether or not the current user has admin/write access to the referenced datacollection
Deprecated:

Definition at line 467 of file class.ilObjDataCollection.php.

468 {
470 }

References ilObjDataCollectionAccess\hasWriteAccess().

+ Here is the call graph for this function:

◆ cloneStructure()

ilObjDataCollection::cloneStructure (   $original_id)

Attention only use this for objects who have not yet been created (use like: $x = new ilObjDataCollection; $x->cloneStructure($id))

Parameters
$original_idThe original ID of the dataselection you want to clone it's structure

Definition at line 341 of file class.ilObjDataCollection.php.

342 {
343 $original = new ilObjDataCollection($original_id);
344
345 $this->setApproval($original->getApproval());
346 $this->setNotification($original->getNotification());
347 $this->setPublicNotes($original->getPublicNotes());
348 $this->setRating($original->getRating());
349
350 // delete old tables.
351 foreach ($this->getTables() as $table) {
352 $table->doDelete();
353 }
354
355 // add new tables.
356 foreach ($original->getTables() as $table) {
357 $new_table = new ilDclTable();
358 $new_table->setObjId($this->getId());
359 $new_table->cloneStructure($table);
360 }
361
362 // mandatory for all cloning functions
364
365 foreach ($this->getTables() as $table) {
366 $table->afterClone();
367 }
368 }
const TYPE_DATACOLLECTION
static setCloneOf($old, $new, $type)
Class ilDclBaseFieldModel.
Class ilObjDataCollection.
setPublicNotes($a_val)
setPublicNotes
setNotification($a_val)
setNotification
getId()
get object id @access public

References ilObject\getId(), getTables(), setApproval(), ilDclCache\setCloneOf(), setNotification(), setPublicNotes(), setRating(), and ilDclCache\TYPE_DATACOLLECTION.

+ Here is the call graph for this function:

◆ doClone()

ilObjDataCollection::doClone ( )
Returns
bool

Definition at line 79 of file class.ilObjDataCollection.php.

80 {
81 return false;
82 }

◆ doCloneObject()

ilObjDataCollection::doCloneObject (   $new_obj,
  $a_target_id,
  $a_copy_id = null,
  $a_omit_tree = false 
)

Clone DCL.

Parameters
ilObjDataCollection$new_obj
int$a_target_idref_id
int$a_copy_id
Returns
ilObjPoll

Definition at line 290 of file class.ilObjDataCollection.php.

291 {
292
293 //copy online status if object is not the root copy object
294 $cp_options = ilCopyWizardOptions::_getInstance($a_copy_id);
295
296 if (!$cp_options->isRootNode($this->getRefId())) {
297 $new_obj->setOnline($this->getOnline());
298 }
299
300 $new_obj->cloneStructure($this->getRefId());
301
302 return $new_obj;
303 }
static _getInstance($a_copy_id)
Get instance of copy wizard options.
getRefId()
get reference id @access public

References ilCopyWizardOptions\_getInstance(), getOnline(), and ilObject2\getRefId().

+ Here is the call graph for this function:

◆ doCreate()

ilObjDataCollection::doCreate (   $clone_mode = false)
protected

Definition at line 39 of file class.ilObjDataCollection.php.

40 {
41 global $DIC;
42 $ilDB = $DIC['ilDB'];
43 $ilLog = $DIC['ilLog'];
44
45 $ilLog->write('doCreate');
46
47 if (!$clone_mode) {
48 //Create Main Table - The title of the table is per default the title of the data collection object
49 $main_table = ilDclCache::getTableCache();
50 $main_table->setObjId($this->getId());
51 $main_table->setTitle($this->getTitle());
52 $main_table->setAddPerm(1);
53 $main_table->setEditPerm(1);
54 $main_table->setDeletePerm(0);
55 $main_table->setDeleteByOwner(1);
56 $main_table->setEditByOwner(1);
57 $main_table->setLimited(0);
58 $main_table->setIsVisible(true);
59 $main_table->doCreate();
60 }
61
62 $ilDB->insert(
63 "il_dcl_data",
64 array(
65 "id" => array("integer", $this->getId()),
66 "is_online" => array("integer", (int) $this->getOnline()),
67 "rating" => array("integer", (int) $this->getRating()),
68 "public_notes" => array("integer", (int) $this->getPublicNotes()),
69 "approval" => array("integer", (int) $this->getApproval()),
70 "notification" => array("integer", (int) $this->getNotification()),
71 )
72 );
73 }
static getTableCache($table_id=0)
getTitle()
get object title @access public

References $DIC, $ilDB, getApproval(), ilObject\getId(), getNotification(), getOnline(), getPublicNotes(), getRating(), ilDclCache\getTableCache(), and ilObject2\getTitle().

+ Here is the call graph for this function:

◆ doDelete()

ilObjDataCollection::doDelete ( )
protected

Reimplemented from ilObject2.

Definition at line 85 of file class.ilObjDataCollection.php.

86 {
87 global $DIC;
88 $ilDB = $DIC['ilDB'];
89
90 foreach ($this->getTables() as $table) {
91 $table->doDelete(false, true);
92 }
93
94 $query = "DELETE FROM il_dcl_data WHERE id = " . $ilDB->quote($this->getId(), "integer");
95 $ilDB->manipulate($query);
96 }
$query

References $DIC, $ilDB, $query, ilObject\getId(), and getTables().

+ Here is the call graph for this function:

◆ doRead()

ilObjDataCollection::doRead ( )

Reimplemented from ilObject2.

Definition at line 23 of file class.ilObjDataCollection.php.

24 {
25 global $DIC;
26 $ilDB = $DIC['ilDB'];
27
28 $result = $ilDB->query("SELECT * FROM il_dcl_data WHERE id = " . $ilDB->quote($this->getId(), "integer"));
29
30 $data = $ilDB->fetchObject($result);
31 $this->setOnline($data->is_online);
32 $this->setRating($data->rating);
33 $this->setApproval($data->approval);
34 $this->setPublicNotes($data->public_notes);
35 $this->setNotification($data->notification);
36 }
$data
Definition: storeScorm.php:23

References $data, $DIC, $ilDB, $result, setApproval(), setNotification(), setOnline(), setPublicNotes(), and setRating().

+ Here is the call graph for this function:

◆ doUpdate()

ilObjDataCollection::doUpdate ( )

Reimplemented from ilObject2.

Definition at line 99 of file class.ilObjDataCollection.php.

100 {
101 global $DIC;
102 $ilDB = $DIC['ilDB'];
103
104 $ilDB->update(
105 "il_dcl_data",
106 array(
107 "id" => array("integer", $this->getId()),
108 "is_online" => array("integer", (int) $this->getOnline()),
109 "rating" => array("integer", (int) $this->getRating()),
110 "public_notes" => array("integer", (int) $this->getPublicNotes()),
111 "approval" => array("integer", (int) $this->getApproval()),
112 "notification" => array("integer", (int) $this->getNotification()),
113 ),
114 array(
115 "id" => array("integer", $this->getId()),
116 )
117 );
118 }

References $DIC, $ilDB, getApproval(), ilObject\getId(), getNotification(), getOnline(), getPublicNotes(), and getRating().

+ Here is the call graph for this function:

◆ getApproval()

ilObjDataCollection::getApproval ( )

getApproval

Definition at line 437 of file class.ilObjDataCollection.php.

438 {
439 return $this->approval;
440 }

Referenced by doCreate(), and doUpdate().

+ Here is the caller graph for this function:

◆ getNotification()

ilObjDataCollection::getNotification ( )

getNotification

Definition at line 455 of file class.ilObjDataCollection.php.

456 {
457 return $this->notification;
458 }

Referenced by doCreate(), and doUpdate().

+ Here is the caller graph for this function:

◆ getOnline()

ilObjDataCollection::getOnline ( )

getOnline

Definition at line 383 of file class.ilObjDataCollection.php.

384 {
385 return $this->is_online;
386 }

Referenced by doCloneObject(), doCreate(), and doUpdate().

+ Here is the caller graph for this function:

◆ getPublicNotes()

ilObjDataCollection::getPublicNotes ( )

getPublicNotes

Definition at line 419 of file class.ilObjDataCollection.php.

420 {
421 return $this->public_notes;
422 }

Referenced by doCreate(), and doUpdate().

+ Here is the caller graph for this function:

◆ getRating()

ilObjDataCollection::getRating ( )

getRating

Definition at line 401 of file class.ilObjDataCollection.php.

402 {
403 return $this->rating;
404 }

Referenced by doCreate(), and doUpdate().

+ Here is the caller graph for this function:

◆ getStyleSheetId()

ilObjDataCollection::getStyleSheetId ( )

Definition at line 549 of file class.ilObjDataCollection.php.

550 {
551 }

◆ getTableById()

ilObjDataCollection::getTableById (   $table_id)

Definition at line 506 of file class.ilObjDataCollection.php.

507 {
508 return ilDclCache::getTableCache($table_id);
509 }

References ilDclCache\getTableCache().

+ Here is the call graph for this function:

◆ getTables()

ilObjDataCollection::getTables ( )
Returns
ilDclTable[] Returns an array of tables of this collection with ids of the tables as keys.

Definition at line 488 of file class.ilObjDataCollection.php.

489 {
490 global $DIC;
491 $ilDB = $DIC['ilDB'];
492
493 $query = "SELECT id FROM il_dcl_table WHERE obj_id = " . $ilDB->quote($this->getId(), "integer") .
494 " ORDER BY -table_order DESC";
495 $set = $ilDB->query($query);
496 $tables = array();
497
498 while ($rec = $ilDB->fetchAssoc($set)) {
499 $tables[$rec['id']] = ilDclCache::getTableCache($rec['id']);
500 }
501
502 return $tables;
503 }

References $DIC, $ilDB, $query, ilObject\getId(), and ilDclCache\getTableCache().

Referenced by ilDclReferenceFieldRepresentation\buildFieldCreationInput(), cloneStructure(), doDelete(), and getVisibleTables().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getVisibleTables()

ilObjDataCollection::getVisibleTables ( )
Returns
array

Definition at line 515 of file class.ilObjDataCollection.php.

516 {
517 $tables = array();
518 foreach ($this->getTables() as $table) {
519 if ($table->getIsVisible() && $table->getVisibleTableViews($this->ref_id)) {
520 $tables[$table->getId()] = $table;
521 }
522 }
523
524 return $tables;
525 }

References getTables().

+ Here is the call graph for this function:

◆ initType()

ilObjDataCollection::initType ( )

Reimplemented from ilObject2.

Definition at line 17 of file class.ilObjDataCollection.php.

18 {
19 $this->type = "dcl";
20 }

◆ prepareMessageText()

ilObjDataCollection::prepareMessageText ( string  $body)

Definition at line 553 of file class.ilObjDataCollection.php.

553 : string
554 {
555 if (preg_match_all('/<.*?br.*?>/', $body, $matches)) {
556 $matches = array_unique($matches[0]);
557 $brNewLineMatches = array_map(static function($match): string {
558 return $match . "\n";
559 }, $matches);
560
561 //Remove carriage return to guarantee all new line can be properly found
562 $body = str_replace("\r", '', $body);
563 //Replace occurrence of <br> + \n with a single \n
564 $body = str_replace($brNewLineMatches, "\n", $body);
565 //Replace additional <br> with a \”
566 $body = str_replace($matches, "\n", $body);
567 //Revert removal of carriage return
568 return str_replace("\n", "\r\n", $body);
569 }
570 return $body;
571 }

◆ reorderTables()

ilObjDataCollection::reorderTables (   $table_order)
Parameters
$table_order

Definition at line 266 of file class.ilObjDataCollection.php.

267 {
268 if ($table_order) {
269 $order = 10;
270 foreach ($table_order as $title) {
271 $table_id = ilDclTable::_getTableIdByTitle($title, $this->getId());
272 $table = ilDclCache::getTableCache($table_id);
273 $table->setOrder($order);
274 $table->doUpdate();
275 $order += 10;
276 }
277 }
278 }
static _getTableIdByTitle($title, $obj_id)

References ilObject\$title, ilDclTable\_getTableIdByTitle(), ilObject\getId(), and ilDclCache\getTableCache().

+ Here is the call graph for this function:

◆ setApproval()

ilObjDataCollection::setApproval (   $a_val)

setApproval

Definition at line 428 of file class.ilObjDataCollection.php.

429 {
430 $this->approval = $a_val;
431 }

Referenced by cloneStructure(), and doRead().

+ Here is the caller graph for this function:

◆ setNotification()

ilObjDataCollection::setNotification (   $a_val)

setNotification

Definition at line 446 of file class.ilObjDataCollection.php.

447 {
448 $this->notification = $a_val;
449 }
notification()
Definition: notification.php:2

References notification().

Referenced by cloneStructure(), and doRead().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setOnline()

ilObjDataCollection::setOnline (   $a_val)

setOnline

Definition at line 374 of file class.ilObjDataCollection.php.

375 {
376 $this->is_online = $a_val;
377 }

Referenced by doRead().

+ Here is the caller graph for this function:

◆ setPublicNotes()

ilObjDataCollection::setPublicNotes (   $a_val)

setPublicNotes

Definition at line 410 of file class.ilObjDataCollection.php.

411 {
412 $this->public_notes = $a_val;
413 }

Referenced by cloneStructure(), and doRead().

+ Here is the caller graph for this function:

◆ setRating()

ilObjDataCollection::setRating (   $a_val)

setRating

Definition at line 392 of file class.ilObjDataCollection.php.

393 {
394 $this->rating = $a_val;
395 }

Referenced by cloneStructure(), and doRead().

+ Here is the caller graph for this function:

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