ILIAS
release_5-0 Revision 5.0.0-1144-gc4397b1f870
|
Class ilObjLanguageExt. More...
Public Member Functions | |
ilObjLanguageExt ($a_id=0, $a_call_by_reference=false) | |
Constructor. More... | |
getGlobalLanguageFile () | |
Read and get the global language file as an object. More... | |
setLocal ($a_local=true) | |
Set the local status of the language. More... | |
getLongDescription () | |
Get the full language description. More... | |
getLangPath () | |
Get the language files path. More... | |
getCustLangPath () | |
Get the customized language files path. More... | |
getAllRemarks () | |
Get all remarks from the database. More... | |
getAllValues ($a_modules=array(), $a_pattern='') | |
Get all values from the database. More... | |
getChangedValues ($a_modules=array(), $a_pattern='') | |
Get only the changed values from the database which differ from the original language file. More... | |
getUnchangedValues ($a_modules=array(), $a_pattern='') | |
Get only the unchanged values from the database which are equal to the original language file. More... | |
getAddedValues ($a_modules=array(), $a_pattern='') | |
Get only the entries which don't exist in the global language file. More... | |
getCommentedValues ($a_modules=array(), $a_pattern='') | |
Get all values from the database for wich the global language file has a comment. More... | |
getMergedValues () | |
Get the local values merged into the values of the global language file. More... | |
getMergedRemarks () | |
Get the local remarks merged into the remarks of the global language file. More... | |
importLanguageFile ($a_file, $a_mode_existing='keepnew') | |
Import a language file into the ilias database. More... | |
![]() | |
ilObjLanguage ($a_id=0, $a_call_by_reference=false) | |
Constructor. More... | |
getKey () | |
get language key More... | |
getStatus () | |
get language status More... | |
isSystemLanguage () | |
check if language is system language More... | |
isUserLanguage () | |
check if language is system language More... | |
isInstalled () | |
Check language object status, and return true if language is installed. More... | |
isLocal () | |
Check language object status, and return true if a local language file is installed. More... | |
install ($scope='') | |
install current language More... | |
uninstall () | |
uninstall current language More... | |
refresh () | |
refresh current language More... | |
flush ($a_mode='all') | |
remove language data from database More... | |
getLocalChanges ($a_min_date="", $a_max_date="") | |
get locally changed language entries More... | |
_getLastLocalChange ($a_key) | |
get the date of the last local change More... | |
insert ($scope='') | |
insert language data from file into database More... | |
resetUserLanguage ($lang_key) | |
search ILIAS for users which have selected '$lang_key' as their prefered language and reset them to default language (english). More... | |
cut_header ($content) | |
remove lang-file haeder information from '$content' This function seeks for a special keyword where the language information starts. More... | |
optimizeData () | |
optimizes the db-table langdata More... | |
check ($scope='') | |
Validate the logical structure of a lang file. More... | |
![]() | |
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... | |
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) public 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 | _getModules ($a_lang_key) |
Get all modules of a language. More... | |
static | _getRemarks ($a_lang_key, $a_all_changed=false) |
Get all remarks of a language. More... | |
static | _getValues ($a_lang_key, $a_modules=array(), $a_topics=array(), $a_pattern='', $a_state='') |
Get the translations of specified topics. More... | |
static | _saveValues ($a_lang_key, $a_values=array(), $a_remarks=array()) |
Save a set of translation in the database. More... | |
static | _deleteValues ($a_lang_key, $a_values=array()) |
Delete a set of translation in the database. More... | |
![]() | |
static | getInstalledLanguages () |
Get the language objects of the installed languages. More... | |
static | refreshAll () |
Refresh all installed languages. More... | |
static | refreshPlugins ($a_lang_keys=null) |
static | _deleteLangData ($a_lang_key, $a_keep_local_change=false) |
Delete languge data. More... | |
static | replaceLangEntry ($a_module, $a_identifier, $a_lang_key, $a_value, $a_local_change=null, $a_remarks=null) |
Replace lang entry. More... | |
static | updateLangEntry ($a_module, $a_identifier, $a_lang_key, $a_value, $a_local_change=null, $a_remarks=null) |
Replace lang entry. More... | |
static | deleteLangEntry ($a_module, $a_identifier, $a_lang_key) |
Delete lang entry. More... | |
static | countUsers ($a_lang) |
Count number of users that use a language. More... | |
![]() | |
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... | |
Additional Inherited Members | |
![]() | |
$separator | |
$comment_separator | |
$lang_default | |
$lang_user | |
$lang_path | |
$key | |
$status | |
![]() | |
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... | |
|
static |
Delete a set of translation in the database.
static
string | language key |
array | module.separator.topic => value |
Definition at line 472 of file class.ilObjLanguageExt.php.
References $ilDB, ilObjLanguage\$key, ilObject\$lng, $row, and ilObjLanguage\deleteLangEntry().
Referenced by ilObjLanguageExtGUI\maintainExecuteObject().
|
static |
Get all modules of a language.
static
string | language key |
Definition at line 286 of file class.ilObjLanguageExt.php.
References $ilDB, and DB_FETCHMODE_ASSOC.
Referenced by ilLanguageExtTableGUI\initFilter(), and ilObjLanguageExtGUI\statisticsObject().
|
static |
Get all remarks of a language.
static
string | language key |
boolean | include empty remarks for local changes |
Definition at line 310 of file class.ilObjLanguageExt.php.
References $ilDB, ilObject\$lng, $result, and $row.
Referenced by ilObjLanguageExtGUI\viewObject().
|
static |
Get the translations of specified topics.
static
string | language key |
array | list of modules |
array | list of topics |
array | search pattern |
string | local change state ('changed', 'unchanged', '') |
Definition at line 349 of file class.ilObjLanguageExt.php.
References $ilDB, ilObject\$lng, and DB_FETCHMODE_ASSOC.
Referenced by ilObjLanguageExtGUI\viewObject().
|
static |
Save a set of translation in the database.
static
string | language key |
array | module.separator.topic => value |
array | module.separator.topic => remarks |
Definition at line 401 of file class.ilObjLanguageExt.php.
References $ilDB, ilObjLanguage\$key, ilObject\$lng, $row, ilLanguageFile\_getGlobalLanguageFile(), ilCachedLanguage\getInstance(), and ilObjLanguage\replaceLangEntry().
Referenced by ilObjLanguageExtGUI\saveObject().
ilObjLanguageExt::getAddedValues | ( | $a_modules = array() , |
|
$a_pattern = '' |
|||
) |
Get only the entries which don't exist in the global language file.
array | list of modules |
array | search pattern |
Definition at line 144 of file class.ilObjLanguageExt.php.
References getGlobalLanguageFile().
ilObjLanguageExt::getAllRemarks | ( | ) |
Get all remarks from the database.
Definition at line 92 of file class.ilObjLanguageExt.php.
ilObjLanguageExt::getAllValues | ( | $a_modules = array() , |
|
$a_pattern = '' |
|||
) |
Get all values from the database.
array | list of modules |
string | search pattern |
Definition at line 104 of file class.ilObjLanguageExt.php.
Referenced by importLanguageFile().
ilObjLanguageExt::getChangedValues | ( | $a_modules = array() , |
|
$a_pattern = '' |
|||
) |
Get only the changed values from the database which differ from the original language file.
array | list of modules |
string | search pattern |
Definition at line 118 of file class.ilObjLanguageExt.php.
Referenced by importLanguageFile().
ilObjLanguageExt::getCommentedValues | ( | $a_modules = array() , |
|
$a_pattern = '' |
|||
) |
Get all values from the database for wich the global language file has a comment.
Note: This function checks the comments in the globel lang file, not the remarks in the database!
array | list of modules |
array | search pattern |
Definition at line 164 of file class.ilObjLanguageExt.php.
References getGlobalLanguageFile().
ilObjLanguageExt::getCustLangPath | ( | ) |
Get the customized language files path.
Definition at line 82 of file class.ilObjLanguageExt.php.
ilObjLanguageExt::getGlobalLanguageFile | ( | ) |
Read and get the global language file as an object.
Definition at line 29 of file class.ilObjLanguageExt.php.
References ilLanguageFile\_getGlobalLanguageFile().
Referenced by getAddedValues(), getCommentedValues(), getMergedRemarks(), and getMergedValues().
ilObjLanguageExt::getLangPath | ( | ) |
Get the language files path.
Definition at line 72 of file class.ilObjLanguageExt.php.
References ilObjLanguage\$lang_path.
ilObjLanguageExt::getLongDescription | ( | ) |
Get the full language description.
Definition at line 62 of file class.ilObjLanguageExt.php.
ilObjLanguageExt::getMergedRemarks | ( | ) |
Get the local remarks merged into the remarks of the global language file.
The returned array contains:
Definition at line 206 of file class.ilObjLanguageExt.php.
References getGlobalLanguageFile().
ilObjLanguageExt::getMergedValues | ( | ) |
Get the local values merged into the values of the global language file.
The returned array contains:
Definition at line 185 of file class.ilObjLanguageExt.php.
References getGlobalLanguageFile().
ilObjLanguageExt::getUnchangedValues | ( | $a_modules = array() , |
|
$a_pattern = '' |
|||
) |
Get only the unchanged values from the database which are equal to the original language file.
array | list of modules |
array | search pattern |
Definition at line 132 of file class.ilObjLanguageExt.php.
ilObjLanguageExt::ilObjLanguageExt | ( | $a_id = 0 , |
|
$a_call_by_reference = false |
|||
) |
Constructor.
Definition at line 20 of file class.ilObjLanguageExt.php.
References ilObjLanguage\ilObjLanguage().
ilObjLanguageExt::importLanguageFile | ( | $a_file, | |
$a_mode_existing = 'keepnew' |
|||
) |
Import a language file into the ilias database.
string | handling of existing values ('keepall','keepnew','replace','delete') |
Definition at line 226 of file class.ilObjLanguageExt.php.
References $ilDB, $ilErr, ilObjLanguage\$key, ilObjLanguage\_deleteLangData(), getAllValues(), and getChangedValues().
ilObjLanguageExt::setLocal | ( | $a_local = true | ) |
Set the local status of the language.
boolean | local status (true/false) |
Definition at line 40 of file class.ilObjLanguageExt.php.
References ilObjLanguage\isInstalled(), ilObject\setDescription(), and ilObject\update().