ILIAS  Release_3_10_x_branch Revision 61812
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilObjSystemFolder Class Reference

Class ilObjSystemFolder. More...

+ Inheritance diagram for ilObjSystemFolder:
+ Collaboration diagram for ilObjSystemFolder:

Public Member Functions

 ilObjSystemFolder ($a_id, $a_call_by_reference=true)
 Constructor public.
 delete ()
 delete systemfolder and all related data DISABLED public
 getHeaderTitleTranslations ()
 get all translations for header title
 removeHeaderTitleTranslations ()
 addHeaderTitleTranslation ($a_title, $a_desc, $a_lang, $a_lang_default)
 _getId ()
 _getHeaderTitle ()
 _getHeaderTitleDescription ()
- Public Member Functions inherited from ilObject
 ilObject ($a_id=0, $a_reference=true)
 Constructor public.
 withReferences ()
 determines wehter objects are referenced or not (got ref ids or not)
 read ($a_force_db=false)
 read object data from db into object
 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
 update ()
 update object in db
 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)
 _getAllReferences ($a_id)
 get all reference ids of object
 _lookupTitle ($a_id)
 lookup object title
 _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.
 _lookupObjId ($a_id)
 _setDeletedDate ($a_ref_id)
 only called in ilTree::saveSubTree
 _resetDeletedDate ($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)
 _lookupType ($a_id, $a_reference=false)
 lookup object type
 _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
 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
 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 ()
 cloneObject ($a_target_id, $a_copy_id=0)
 Clone object permissions, put in tree ...
 appendCopyInfo ($a_target_id, $a_copy_id)
 Prepend Copy info if object with same name exists in that container.
 cloneDependencies ($a_target_id, $a_copy_id)
 Clone object dependencies.
 cloneMetaData ($target_obj)
 Copy meta data.

Additional Inherited Members

- Static Public Member Functions inherited from ilObject
static _getIdsForTitle ($title, $type= '')
 _exists ($a_id, $a_reference=false)
 checks if an object exists in object_data
static _getObjectsByType ($a_obj_type="")
 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)
- Data Fields inherited from ilObject
 $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

Detailed Description

Class ilObjSystemFolder.

Author
Stefan Meyer smeye.nosp@m.r@da.nosp@m.tabay.nosp@m..de
Version
Id:
class.ilObjSystemFolder.php 15697 2008-01-08 20:04:33Z hschottm

Definition at line 36 of file class.ilObjSystemFolder.php.

Member Function Documentation

ilObjSystemFolder::_getHeaderTitle ( )

Definition at line 143 of file class.ilObjSystemFolder.php.

References ilObject\$id, ilObject\$title, _getId(), and DB_FETCHMODE_OBJECT.

Referenced by ilObjSystemFolderGUI\displayBasicSettings(), and ilMainMenuGUI\setTemplateVars().

{
global $ilDB;
$q = "SELECT title,description FROM object_translation ".
"WHERE obj_id = ".$ilDB->quote($id)." ".
"AND lang_default = 1";
$r = $this->ilias->db->query($q);
$row = $r->fetchRow(DB_FETCHMODE_OBJECT);
$title = $row->title;
$q = "SELECT title,description FROM object_translation ".
"WHERE obj_id = ".$ilDB->quote($id)." ".
"AND lang_code = ".
$ilDB->quote($this->ilias->account->getPref("language"))." ".
"AND NOT lang_default = 1";
$r = $this->ilias->db->query($q);
$row = $r->fetchRow(DB_FETCHMODE_OBJECT);
if ($row)
{
$title = $row->title;
}
return $title;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjSystemFolder::_getHeaderTitleDescription ( )

Definition at line 172 of file class.ilObjSystemFolder.php.

References ilObject\$id, _getId(), DB_FETCHMODE_OBJECT, and ilUtil\shortenText().

{
global $ilDB;
$q = "SELECT title,description FROM object_translation ".
"WHERE obj_id = ".$ilDB->quote($id)." ".
"AND lang_default = 1";
$r = $this->ilias->db->query($q);
$row = $r->fetchRow(DB_FETCHMODE_OBJECT);
$description = $row->description;
$q = "SELECT title,description FROM object_translation ".
"WHERE obj_id = ".$ilDB->quote($id)." ".
"AND lang_code = ".
$ilDB->quote($this->ilias->account->getPref("language"))." ".
"AND NOT lang_default = 1";
$r = $this->ilias->db->query($q);
$row = $r->fetchRow(DB_FETCHMODE_OBJECT);
if ($row)
{
$description = ilUtil::shortenText($row->description,MAXLENGTH_OBJ_DESC,true);
}
return $description;
}

+ Here is the call graph for this function:

ilObjSystemFolder::_getId ( )

Definition at line 133 of file class.ilObjSystemFolder.php.

References DB_FETCHMODE_OBJECT.

Referenced by _getHeaderTitle(), and _getHeaderTitleDescription().

{
$q = "SELECT obj_id FROM object_data ".
"WHERE type = 'adm'";
$r = $this->ilias->db->query($q);
$row = $r->fetchRow(DB_FETCHMODE_OBJECT);
return $row->obj_id;
}

+ Here is the caller graph for this function:

ilObjSystemFolder::addHeaderTitleTranslation (   $a_title,
  $a_desc,
  $a_lang,
  $a_lang_default 
)

Definition at line 116 of file class.ilObjSystemFolder.php.

References ilObject\getId().

{
global $ilDB;
$q = "INSERT INTO object_translation ".
"(obj_id,title,description,lang_code,lang_default) ".
"VALUES ".
"(".$ilDB->quote($this->getId()).",".
$ilDB->quote($a_title).",".
$ilDB->quote($a_desc).",".
$ilDB->quote($a_lang).",".
$ilDB->quote($a_lang_default).")";
$this->ilias->db->query($q);
return true;
}

+ Here is the call graph for this function:

ilObjSystemFolder::delete ( )

delete systemfolder and all related data DISABLED public

Returns
boolean true if all object data were removed; false if only a references were removed

Reimplemented from ilObject.

Definition at line 57 of file class.ilObjSystemFolder.php.

{
// DISABLED
return false;
// always call parent delete function first!!
if (!parent::delete())
{
return false;
}
// put here systemfolder specific stuff
// always call parent delete function at the end!!
return true;
}
ilObjSystemFolder::getHeaderTitleTranslations ( )

get all translations for header title

public

Returns
array

Definition at line 80 of file class.ilObjSystemFolder.php.

References $data, DB_FETCHMODE_OBJECT, ilObject\getId(), and ilUtil\shortenText().

{
global $ilDB;
$q = "SELECT * FROM object_translation WHERE obj_id = ".
$ilDB->quote($this->getId())." ORDER BY lang_default DESC";
$r = $this->ilias->db->query($q);
$num = 0;
while ($row = $r->fetchRow(DB_FETCHMODE_OBJECT))
{
$data["Fobject"][$num]= array("title" => $row->title,
"desc" => ilUtil::shortenText($row->description,MAXLENGTH_OBJ_DESC,true),
"lang" => $row->lang_code
);
$num++;
}
// first entry is always the default language
$data["default_language"] = 0;
return $data ? $data : array();
}

+ Here is the call graph for this function:

ilObjSystemFolder::ilObjSystemFolder (   $a_id,
  $a_call_by_reference = true 
)

Constructor public.

Parameters
integerreference_id or object_id
booleantreat the id as reference_id (true) or object_id (false)

Definition at line 44 of file class.ilObjSystemFolder.php.

References ilObject\ilObject().

{
$this->type = "adm";
$this->ilObject($a_id,$a_call_by_reference);
}

+ Here is the call graph for this function:

ilObjSystemFolder::removeHeaderTitleTranslations ( )

Definition at line 106 of file class.ilObjSystemFolder.php.

References ilObject\getId().

{
global $ilDB;
$q = "DELETE FROM object_translation WHERE obj_id= ".
$ilDB->quote($this->getId());
$this->ilias->db->query($q);
}

+ Here is the call graph for this function:


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