ILIAS
eassessment Revision 61809
|
Class ilObject2 This is an intermediate progress of ilObject class. More...
Public Member Functions | |
__construct ($a_id=0, $a_reference=true) | |
Constructor public. | |
initType () | |
withReferences () | |
determines wehter objects are referenced or not (got ref ids or not) | |
read ($a_force_db=false) | |
Read data from db. | |
doRead () | |
getId () | |
get object id public | |
setId ($a_id) | |
set object id public | |
setRefId ($a_id) | |
set reference id public | |
getRefId () | |
get reference id public | |
getType () | |
get object type public | |
setType ($a_type) | |
set object type public | |
getPresentationTitle () | |
get presentation title Normally same as title Overwritten for sessions | |
getTitle () | |
get object title public | |
getUntranslatedTitle () | |
get untranslated object title public | |
setTitle ($a_title) | |
set object title | |
getDescription () | |
get object description | |
setDescription ($a_desc) | |
set object description | |
getLongDescription () | |
get object long description (stored in object_description) | |
getImportId () | |
get import id | |
setImportId ($a_import_id) | |
set import id | |
_lookupObjIdByImportId ($a_import_id) | |
getOwner () | |
get object owner | |
getOwnerName () | |
_lookupOwnerName ($a_owner_id) | |
lookup owner name for owner id | |
setOwner ($a_owner) | |
set object owner | |
getCreateDate () | |
get create date public | |
getLastUpdateDate () | |
get last update date public | |
setObjDataRecord ($a_record) | |
set object_data record (note: this method should only be called from the ilObjectFactory class) | |
create () | |
create | |
doCreate () | |
update () | |
update object in db | |
doUpdate () | |
MDUpdateListener ($a_element) | |
Meta data update listener. | |
createMetaData () | |
create meta data entry | |
updateMetaData () | |
update meta data entry | |
deleteMetaData () | |
delete meta data entry | |
updateOwner () | |
update owner of object in db | |
_getIdForImportId ($a_import_id) | |
get current object id for import id (static) | |
_lookupOwner ($a_id) | |
lookup object owner | |
_lookupDescription ($a_id) | |
lookup object description | |
_lookupLastUpdate ($a_id, $a_as_string=false) | |
lookup last update | |
_getLastUpdateOfObjects ($a_objs) | |
Get last update for a set of media objects. | |
_setDeletedDate ($a_ref_id) | |
only called in ilTree::saveSubTree | |
_resetDeletedDate ($a_ref_id) | |
only called in ilObjectGUI::insertSavedNodes | |
_lookupDeletedDate ($a_ref_id) | |
only called in ilObjectGUI::insertSavedNodes | |
_writeTitle ($a_obj_id, $a_title) | |
write title to db (static) | |
_writeDescription ($a_obj_id, $a_desc) | |
write description to db (static) | |
_writeImportId ($a_obj_id, $a_import_id) | |
write import id to db (static) | |
_isInTrash ($a_ref_id) | |
checks wether object is in trash | |
_hasUntrashedReference ($a_obj_id) | |
checks wether an object has at least one reference that is not in trash | |
_lookupObjectId ($a_ref_id) | |
lookup object id | |
_getObjectsDataForType ($a_type, $a_omit_trash=false) | |
get all objects of a certain type | |
putInTree ($a_parent_ref) | |
maybe this method should be in tree object!? | |
setPermissions ($a_parent_ref) | |
set permissions of object | |
createReference () | |
creates reference for object | |
countReferences () | |
count references of object | |
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!! | |
doDelete () | |
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 | |
createRoleFolder () | |
creates a local role folder | |
_exists ($a_id, $a_reference=false) | |
checks if an object exists in object_data | |
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. | |
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. | |
cloneMetaData ($target_obj) | |
Copy meta data. | |
cloneObject ($a_target_id, $a_copy_id=0) | |
Clone object permissions, put in tree ... | |
doClone ($a_target_id, $a_copy_id, $new_obj) | |
cloneDependencies ($a_target_id, $a_copy_id) | |
Clone object dependencies. | |
Public Member Functions inherited from ilObject | |
ilObject ($a_id=0, $a_reference=true) | |
Constructor public. | |
getDiskUsage () | |
Gets the disk usage of the object in bytes. |
Static Public Member Functions | |
static | _getAllReferences ($a_id) |
get all reference ids of object | |
static | _lookupTitle ($a_id) |
lookup object title | |
static | _getIdsForTitle ($title, $type= '', $partialmatch=false) |
static | _lookupObjId ($a_id) |
static | _lookupType ($a_id, $a_reference=false) |
lookup object type | |
static | _getObjectsByType ($a_obj_type="", $a_owner="") |
Get objects by type. | |
static | _prepareCloneSelection ($a_ref_ids, $new_type) |
Prepare copy wizard object selection. | |
static | _getIcon ($a_obj_id="", $a_size="big", $a_type="", $a_offline=false) |
Get icon for repository item. | |
Static Public Member Functions inherited from ilObject | |
static | collectDeletionDependencies (&$deps, $a_ref_id, $a_obj_id, $a_type, $a_depth=0) |
Collect deletion dependencies. | |
static | getDeletionDependencies ($a_obj_id) |
Get deletion dependencies. |
Protected Member Functions | |
beforeCreate () | |
beforeUpdate () | |
beforeDelete () | |
beforeClone () |
Additional Inherited Members | |
Data Fields inherited from ilObject | |
const | TITLE_LENGTH = 128 |
max length of object title | |
$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 |
Class ilObject2 This is an intermediate progress of ilObject class.
Please do not ust it yet.
Definition at line 14 of file class.ilObject2.php.
ilObject2::__construct | ( | $a_id = 0 , |
|
$a_reference = true |
|||
) |
Constructor public.
integer | reference_id or object_id |
boolean | treat the id as reference_id (true) or object_id (false) |
Definition at line 22 of file class.ilObject2.php.
References ilObject\ilObject(), and initType().
|
final |
checks if an object exists in object_data
public
integer | object id or reference id |
boolean | ture if id is a reference, else false (default) |
Reimplemented from ilObject.
Definition at line 156 of file class.ilObject2.php.
|
staticfinal |
get all reference ids of object
int | $a_id | object id |
Reimplemented from ilObject.
Definition at line 107 of file class.ilObject2.php.
|
staticfinal |
Get icon for repository item.
int | object id |
string | size (big, small, tiny) |
string | object type |
boolean | true: offline, false: online |
Reimplemented from ilObject.
Definition at line 185 of file class.ilObject2.php.
|
final |
get current object id for import id (static)
int | $a_import_id | import id |
Reimplemented from ilObject.
Definition at line 106 of file class.ilObject2.php.
|
staticfinal |
Reimplemented from ilObject.
Definition at line 110 of file class.ilObject2.php.
References ilObject\$title, and ilObject\$type.
|
final |
Get last update for a set of media objects.
array |
Reimplemented from ilObject.
Definition at line 113 of file class.ilObject2.php.
|
staticfinal |
Get objects by type.
Reimplemented from ilObject.
Definition at line 163 of file class.ilObject2.php.
|
final |
get all objects of a certain type
string | $a_type | desired object type |
boolean | $a_omit_trash | omit objects, that are in trash only (default: false) |
Reimplemented from ilObject.
Definition at line 125 of file class.ilObject2.php.
|
final |
checks wether an object has at least one reference that is not in trash
Reimplemented from ilObject.
Definition at line 123 of file class.ilObject2.php.
|
final |
checks wether object is in trash
Reimplemented from ilObject.
Definition at line 122 of file class.ilObject2.php.
|
final |
only called in ilObjectGUI::insertSavedNodes
Reimplemented from ilObject.
Definition at line 117 of file class.ilObject2.php.
|
final |
lookup object description
int | $a_id | object id |
Reimplemented from ilObject.
Definition at line 111 of file class.ilObject2.php.
|
final |
lookup last update
int | $a_id | object id |
Reimplemented from ilObject.
Definition at line 112 of file class.ilObject2.php.
|
final |
lookup object id
int | $a_id | object id |
Reimplemented from ilObject.
Definition at line 124 of file class.ilObject2.php.
|
staticfinal |
Reimplemented from ilObject.
Definition at line 114 of file class.ilObject2.php.
|
final |
Reimplemented from ilObject.
Definition at line 57 of file class.ilObject2.php.
|
final |
lookup object owner
int | $a_id | object id |
Reimplemented from ilObject.
Definition at line 109 of file class.ilObject2.php.
|
final |
lookup owner name for owner id
Reimplemented from ilObject.
Definition at line 60 of file class.ilObject2.php.
|
staticfinal |
lookup object title
int | $a_id | object id |
Reimplemented from ilObject.
Definition at line 108 of file class.ilObject2.php.
|
staticfinal |
lookup object type
int | $a_id | object id |
Reimplemented from ilObject.
Definition at line 121 of file class.ilObject2.php.
|
staticfinal |
Prepare copy wizard object selection.
public
array | int array of ref ids |
Reimplemented from ilObject.
Definition at line 165 of file class.ilObject2.php.
|
final |
only called in ilObjectGUI::insertSavedNodes
Reimplemented from ilObject.
Definition at line 116 of file class.ilObject2.php.
|
final |
only called in ilTree::saveSubTree
Reimplemented from ilObject.
Definition at line 115 of file class.ilObject2.php.
|
final |
write description to db (static)
int | $a_obj_id | object id |
string | $a_desc | description public |
Reimplemented from ilObject.
Definition at line 119 of file class.ilObject2.php.
|
final |
write import id to db (static)
int | $a_obj_id | object id |
string | $a_import_id | import id public |
Reimplemented from ilObject.
Definition at line 120 of file class.ilObject2.php.
|
final |
write title to db (static)
int | $a_obj_id | object id |
string | $a_title | title public |
Reimplemented from ilObject.
Definition at line 118 of file class.ilObject2.php.
|
final |
Prepend Copy info if object with same name exists in that container.
public
int | copy_id |
Reimplemented from ilObject.
Definition at line 166 of file class.ilObject2.php.
|
protected |
Definition at line 178 of file class.ilObject2.php.
Referenced by cloneObject().
|
protected |
Definition at line 74 of file class.ilObject2.php.
Referenced by create().
|
protected |
Definition at line 148 of file class.ilObject2.php.
Referenced by delete().
|
protected |
Definition at line 96 of file class.ilObject2.php.
Referenced by update().
ilObject2::cloneDependencies | ( | $a_target_id, | |
$a_copy_id | |||
) |
Clone object dependencies.
This method allows to refresh any ref id references to other objects that are affected in the same copy process. Ask ilCopyWizardOptions for the mappings.
public
int | ref_id of target object |
int | copy_id |
Reimplemented from ilObject.
Definition at line 183 of file class.ilObject2.php.
|
final |
Copy meta data.
public
object | target object |
Reimplemented from ilObject.
Definition at line 167 of file class.ilObject2.php.
|
final |
Clone object permissions, put in tree ...
public
int | target id |
int | copy id for class.ilCopyWizardOptions() |
Reimplemented from ilObject.
Definition at line 169 of file class.ilObject2.php.
References beforeClone(), and doClone().
|
final |
count references of object
public
Reimplemented from ilObject.
Definition at line 129 of file class.ilObject2.php.
|
final |
create
note: title, description and type should be set when this function is called
public
Reimplemented from ilObject.
Definition at line 66 of file class.ilObject2.php.
References ilObject\$id, beforeCreate(), and doCreate().
|
final |
create meta data entry
Reimplemented from ilObject.
Definition at line 102 of file class.ilObject2.php.
|
final |
creates reference for object
public
Reimplemented from ilObject.
Definition at line 128 of file class.ilObject2.php.
|
final |
creates a local role folder
public
string | rolefolder title |
string | rolefolder description |
object | parent object where the rolefolder is attached to |
Reimplemented from ilObject.
Definition at line 155 of file class.ilObject2.php.
|
final |
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!!
public
Reimplemented from ilObject.
Definition at line 131 of file class.ilObject2.php.
References beforeDelete(), and doDelete().
|
final |
delete meta data entry
Reimplemented from ilObject.
Definition at line 104 of file class.ilObject2.php.
|
abstract |
|
abstract |
|
abstract |
|
abstract |
|
abstract |
|
final |
get create date public
Reimplemented from ilObject.
Definition at line 62 of file class.ilObject2.php.
|
final |
get object description
public
Reimplemented from ilObject.
Definition at line 52 of file class.ilObject2.php.
|
final |
Reimplemented from ilObject.
Definition at line 162 of file class.ilObject2.php.
|
final |
get object id public
Reimplemented from ilObject.
Definition at line 42 of file class.ilObject2.php.
|
final |
get import id
public
Reimplemented from ilObject.
Definition at line 55 of file class.ilObject2.php.
|
final |
get last update date public
Reimplemented from ilObject.
Definition at line 63 of file class.ilObject2.php.
|
final |
get object long description (stored in object_description)
public
Reimplemented from ilObject.
Definition at line 54 of file class.ilObject2.php.
|
final |
get object owner
public
Reimplemented from ilObject.
Definition at line 58 of file class.ilObject2.php.
|
final |
Reimplemented from ilObject.
Definition at line 59 of file class.ilObject2.php.
|
final |
get presentation title Normally same as title Overwritten for sessions
public
@return |
Reimplemented from ilObject.
Definition at line 48 of file class.ilObject2.php.
|
final |
get reference id public
Reimplemented from ilObject.
Definition at line 45 of file class.ilObject2.php.
|
final |
get object title public
Reimplemented from ilObject.
Definition at line 49 of file class.ilObject2.php.
|
final |
get object type public
Reimplemented from ilObject.
Definition at line 46 of file class.ilObject2.php.
Referenced by ilObjectPlugin\__construct().
|
final |
get untranslated object title public
Reimplemented from ilObject.
Definition at line 50 of file class.ilObject2.php.
|
final |
Reimplemented from ilObject.
Definition at line 161 of file class.ilObject2.php.
ilObject2::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
Reimplemented from ilObject.
Definition at line 153 of file class.ilObject2.php.
|
abstract |
Referenced by ilObjectPlugin\__construct(), and __construct().
|
final |
Reimplemented from ilObject.
Definition at line 159 of file class.ilObject2.php.
|
final |
Meta data update listener.
Important note: Do never call create() or update() method of ilObject here. It would result in an endless loop: update object -> update meta -> update object -> ... Use static _writeTitle() ... methods instead.
string | $a_element |
Reimplemented from ilObject.
Definition at line 101 of file class.ilObject2.php.
ilObject2::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.
TODO: add optional array to pass parameters
public
string | event |
integer | reference id of object where the event occured |
integer | reference id of node in the tree which is actually notified |
array | passes optional parameters if required |
Reimplemented from ilObject.
Definition at line 157 of file class.ilObject2.php.
|
final |
maybe this method should be in tree object!?
Reimplemented from ilObject.
Definition at line 126 of file class.ilObject2.php.
|
final |
Read data from db.
Reimplemented from ilObject.
Definition at line 35 of file class.ilObject2.php.
References doRead().
|
final |
Reimplemented from ilObject.
Definition at line 160 of file class.ilObject2.php.
|
final |
set object description
public
string | $a_desc | object description |
Reimplemented from ilObject.
Definition at line 53 of file class.ilObject2.php.
|
final |
set object id public
integer | $a_id | object id |
Reimplemented from ilObject.
Definition at line 43 of file class.ilObject2.php.
|
final |
set import id
public
string | $a_import_id | import id |
Reimplemented from ilObject.
Definition at line 56 of file class.ilObject2.php.
|
final |
set object_data record (note: this method should only be called from the ilObjectFactory class)
array | $a_record | assoc. array from table object_data public |
Reimplemented from ilObject.
Definition at line 64 of file class.ilObject2.php.
|
final |
set object owner
public
integer | $a_owner | owner id |
Reimplemented from ilObject.
Definition at line 61 of file class.ilObject2.php.
|
final |
set permissions of object
integer | reference_id of parent object public |
Reimplemented from ilObject.
Definition at line 127 of file class.ilObject2.php.
|
final |
set reference id public
integer | $a_id | reference id |
Reimplemented from ilObject.
Definition at line 44 of file class.ilObject2.php.
|
final |
Reimplemented from ilObject.
Definition at line 158 of file class.ilObject2.php.
|
final |
set object title
public
string | $a_title | object title |
Reimplemented from ilObject.
Definition at line 51 of file class.ilObject2.php.
|
final |
set object type public
integer | $a_type | object type |
Reimplemented from ilObject.
Definition at line 47 of file class.ilObject2.php.
|
final |
update object in db
public
Reimplemented from ilObject.
Definition at line 79 of file class.ilObject2.php.
References beforeUpdate(), and doUpdate().
|
final |
update meta data entry
Reimplemented from ilObject.
Definition at line 103 of file class.ilObject2.php.
|
final |
update owner of object in db
public
Reimplemented from ilObject.
Definition at line 105 of file class.ilObject2.php.
|
final |
determines wehter objects are referenced or not (got ref ids or not)
Reimplemented from ilObject.
Definition at line 30 of file class.ilObject2.php.