ILIAS
Release_3_10_x_branch Revision 61812
|
Class ilObjLanguage. More...
Public Member Functions | |
ilObjLanguage ($a_id=0, $a_call_by_reference=false) | |
Constructor. | |
getKey () | |
get language key | |
getStatus () | |
get language status | |
isSystemLanguage () | |
check if language is system language | |
isUserLanguage () | |
check if language is system language | |
isInstalled () | |
Check language object status, and return true if language is installed. | |
isLocal () | |
Check language object status, and return true if a local language file is installed. | |
install ($scope= '') | |
install current language | |
uninstall () | |
uninstall current language | |
flush ($a_mode= 'all') | |
remove language data from database | |
getLocalChanges ($a_min_date="", $a_max_date="") | |
get locally changed language entries | |
insert ($scope= '') | |
insert language data from file into database | |
resetUserLanguage ($lang_key) | |
search ILIAS for users which have selected '$lang_key' as their prefered language and reset them to default language (english). | |
cut_header ($content) | |
remove lang-file haeder information from '$content' This function seeks for a special keyword where the language information starts. | |
optimizeData () | |
optimizes the db-table langdata | |
check ($scope= '') | |
Validate the logical structure of a lang file. | |
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 | |
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!! | |
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. |
Static Public Member Functions | |
static | replaceLangModule ($a_key, $a_module, $a_array) |
Replace language module array. | |
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 | |
$separator | |
$comment_separator | |
$lang_default | |
$lang_user | |
$lang_path | |
$key | |
$status | |
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 |
Class ilObjLanguage.
Definition at line 34 of file class.ilObjLanguage.php.
ilObjLanguage::check | ( | $scope = '' | ) |
Validate the logical structure of a lang file.
This function checks if a lang file exists, the file has a header, and each lang-entry consists of exactly three elements (module, identifier, value).
string | $scope | empty (global) or "local" |
Definition at line 535 of file class.ilObjLanguage.php.
References $key, $lang_path, $n, and cut_header().
Referenced by install().
ilObjLanguage::cut_header | ( | $content | ) |
remove lang-file haeder information from '$content' This function seeks for a special keyword where the language information starts.
if found it returns the plain language information, otherwise returns false
string | $content | expecting an ILIAS lang-file |
Definition at line 499 of file class.ilObjLanguage.php.
References $key.
Referenced by check(), ilObjLanguageFolder\checkAllLanguages(), and insert().
ilObjLanguage::flush | ( | $a_mode = 'all' | ) |
remove language data from database
string | "all" or "keep_local" |
Definition at line 238 of file class.ilObjLanguage.php.
Referenced by install(), and uninstall().
ilObjLanguage::getKey | ( | ) |
get language key
Definition at line 83 of file class.ilObjLanguage.php.
References $key.
Referenced by install().
ilObjLanguage::getLocalChanges | ( | $a_min_date = "" , |
|
$a_max_date = "" |
|||
) |
get locally changed language entries
string | minimum change date "yyyy-mm-dd hh:mm:ss" |
string | maximum change date "yyyy-mm-dd hh:mm:ss" |
Definition at line 266 of file class.ilObjLanguage.php.
References $result, and DB_FETCHMODE_ASSOC.
Referenced by insert().
ilObjLanguage::getStatus | ( | ) |
get language status
Definition at line 93 of file class.ilObjLanguage.php.
References $status.
Referenced by isInstalled(), and isLocal().
ilObjLanguage::ilObjLanguage | ( | $a_id = 0 , |
|
$a_call_by_reference = false |
|||
) |
Constructor.
public
integer | reference_id or object_id |
boolean | treat the id as reference_id (true) or object_id (false) |
Definition at line 60 of file class.ilObjLanguage.php.
References ilObject\$desc, ilObject\$lng, ilObject\$title, and ilObject\ilObject().
Referenced by ilObjLanguageExt\ilObjLanguageExt().
ilObjLanguage::insert | ( | $scope = '' | ) |
insert language data from file into database
string | $scope | empty (global) or "local" |
Definition at line 296 of file class.ilObjLanguage.php.
References $key, $lang_path, cut_header(), DB_FETCHMODE_ASSOC, and getLocalChanges().
Referenced by install().
ilObjLanguage::install | ( | $scope = '' | ) |
install current language
string | $scope | empty (global) or "local" |
Definition at line 166 of file class.ilObjLanguage.php.
References check(), flush(), getKey(), insert(), isInstalled(), isLocal(), optimizeData(), ilObject\setDescription(), and ilObject\update().
ilObjLanguage::isInstalled | ( | ) |
Check language object status, and return true if language is installed.
Definition at line 130 of file class.ilObjLanguage.php.
References getStatus().
Referenced by install(), and ilObjLanguageExt\setLocal().
ilObjLanguage::isLocal | ( | ) |
Check language object status, and return true if a local language file is installed.
Definition at line 148 of file class.ilObjLanguage.php.
References getStatus().
Referenced by install().
ilObjLanguage::isSystemLanguage | ( | ) |
check if language is system language
Definition at line 101 of file class.ilObjLanguage.php.
ilObjLanguage::isUserLanguage | ( | ) |
check if language is system language
Definition at line 112 of file class.ilObjLanguage.php.
ilObjLanguage::optimizeData | ( | ) |
optimizes the db-table langdata
Definition at line 517 of file class.ilObjLanguage.php.
Referenced by install().
|
staticfinal |
Replace language module array.
Definition at line 463 of file class.ilObjLanguage.php.
Referenced by ilPlugin\updateLanguages().
ilObjLanguage::resetUserLanguage | ( | $lang_key | ) |
search ILIAS for users which have selected '$lang_key' as their prefered language and reset them to default language (english).
A message is sent to all affected users
string | $lang_key | international language key (2 digits) |
Definition at line 480 of file class.ilObjLanguage.php.
Referenced by uninstall().
ilObjLanguage::uninstall | ( | ) |
uninstall current language
Definition at line 218 of file class.ilObjLanguage.php.
References $key, flush(), resetUserLanguage(), ilObject\setDescription(), ilObject\setTitle(), and ilObject\update().
ilObjLanguage::$comment_separator |
Definition at line 44 of file class.ilObjLanguage.php.
ilObjLanguage::$key |
Definition at line 49 of file class.ilObjLanguage.php.
Referenced by ilObjLanguageExt\_saveValues(), check(), cut_header(), ilObjLanguageExt\getCommentedValues(), getKey(), ilObjLanguageExt\importLanguageFile(), insert(), and uninstall().
ilObjLanguage::$lang_default |
Definition at line 45 of file class.ilObjLanguage.php.
ilObjLanguage::$lang_path |
Definition at line 47 of file class.ilObjLanguage.php.
Referenced by check(), ilObjLanguageExt\getLangPath(), and insert().
ilObjLanguage::$lang_user |
Definition at line 46 of file class.ilObjLanguage.php.
ilObjLanguage::$separator |
Definition at line 43 of file class.ilObjLanguage.php.
ilObjLanguage::$status |
Definition at line 50 of file class.ilObjLanguage.php.
Referenced by getStatus().