ILIAS
release_8 Revision v8.19
|
Class ilObjLanguageExt. More...
Public Member Functions | |
getGlobalLanguageFile () | |
Read and get the global language file as an object. More... | |
setLocal (bool $a_local=true) | |
Set the local status of the language. More... | |
getLongDescription () | |
Get the full language description. More... | |
getDataPath () | |
Return the path for language data written by ILIAS. 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 (array $a_modules=array(), string $a_pattern="", array $a_topics=array()) | |
Get all values from the database. More... | |
getChangedValues (array $a_modules=array(), string $a_pattern="", array $a_topics=array()) | |
Get only the changed values from the database which differ from the original language file. More... | |
getUnchangedValues (array $a_modules=array(), string $a_pattern="", array $a_topics=array()) | |
Get only the unchanged values from the database which are equal to the original language file. More... | |
getAddedValues (array $a_modules=array(), string $a_pattern='', array $a_topics=array()) | |
Get only the entries which don't exist in the global language file. More... | |
getCommentedValues (array $a_modules=array(), string $a_pattern="", array $a_topics=array()) | |
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... | |
![]() | |
__construct (int $a_id=0, bool $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 (string $scope="") | |
install current language More... | |
uninstall () | |
uninstall current language More... | |
refresh () | |
refresh current language More... | |
flush (string $a_mode="all") | |
remove language data from database $a_mode "all" or "keep_local" More... | |
getLocalChanges (string $a_min_date="", string $a_max_date="") | |
get locally changed language entries $a_min_date minimum change date "yyyy-mm-dd hh:mm:ss" $a_max_date maximum change date "yyyy-mm-dd hh:mm:ss" Return array [module][identifier] => value More... | |
insert (string $scope="") | |
insert language data from file into database More... | |
resetUserLanguage (string $lang_key) | |
search ILIAS for users which have selected '$lang_key' as their prefered language and reset them to default language (english). More... | |
optimizeData () | |
optimizes the db-table langdata More... | |
check (string $scope="") | |
Validate the logical structure of a lang file. More... | |
![]() | |
__construct (int $id=0, bool $reference=true) | |
withReferences () | |
determines whether objects are referenced or not (got ref ids or not) More... | |
processAutoRating () | |
read () | |
getId () | |
setId (int $id) | |
setRefId (int $ref_id) | |
getRefId () | |
getType () | |
setType (string $type) | |
getPresentationTitle () | |
get presentation title Normally same as title Overwritten for sessions More... | |
getTitle () | |
getUntranslatedTitle () | |
Get untranslated object title WebDAV needs to access the untranslated title of an object. More... | |
setTitle (string $title) | |
getDescription () | |
setDescription (string $desc) | |
getLongDescription () | |
get object long description (stored in object_description) More... | |
getImportId () | |
setImportId (string $import_id) | |
setOfflineStatus (bool $status) | |
getOfflineStatus () | |
supportsOfflineHandling () | |
getOwner () | |
getOwnerName () | |
get full name of object owner More... | |
setOwner (int $usr_id) | |
getCreateDate () | |
Get create date in YYYY-MM-DD HH-MM-SS format. More... | |
getLastUpdateDate () | |
Get last update date in YYYY-MM-DD HH-MM-SS format. More... | |
create () | |
note: title, description and type should be set when this function is called More... | |
update () | |
MDUpdateListener (string $element) | |
Metadata update listener. More... | |
createMetaData () | |
updateMetaData () | |
deleteMetaData () | |
updateOwner () | |
update owner of object in db More... | |
putInTree (int $parent_ref_id) | |
maybe this method should be in tree object!? More... | |
setPermissions (int $parent_ref_id) | |
setParentRolePermissions (int $parent_ref_id) | |
Initialize the permissions of parent roles (local roles of categories, global roles...) This method is overwritten in e.g. More... | |
createReference () | |
creates reference for object More... | |
countReferences () | |
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. More... | |
applyDidacticTemplate (int $tpl_id) | |
getXMLZip () | |
getHTMLDirectory () | |
appendCopyInfo (int $target_id, int $copy_id) | |
Prepend Copy info if object with same name exists in that container. More... | |
cloneDependencies (int $target_id, int $copy_id) | |
Clone object dependencies. More... | |
cloneMetaData (ilObject $target_obj) | |
Copy meta data. More... | |
selfOrParentWithRatingEnabled () | |
getPossibleSubObjects (bool $filter=true) | |
get all possible sub objects of this type the object can decide which types of sub objects are possible jut in time overwrite if the decision distinguish from standard model More... | |
Static Public Member Functions | |
static | _getModules (string $a_lang_key) |
Get all modules of a language. More... | |
static | _getRemarks (string $a_lang_key, bool $a_all_changed=false) |
Get all remarks of a language. More... | |
static | _getValues (string $a_lang_key, array $a_modules=array(), array $a_topics=array(), string $a_pattern='', string $a_state='') |
Get the translations of specified topics. More... | |
static | _saveValues (string $a_lang_key, array $a_values=array(), array $a_remarks=array()) |
Save a set of translation in the database. More... | |
static | _deleteValues (string $a_lang_key, array $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 (array $a_lang_keys=null) |
Refresh languages of activated plugins $a_lang_keys keys of languages to be refreshed (not yet supported, all available will be refreshed) More... | |
static | _deleteLangData (string $a_lang_key, bool $a_keep_local_change=false) |
Delete languge data $a_lang_key lang key. More... | |
static | _getLastLocalChange (string $a_key) |
get the date of the last local change $a_key language key Return change_date "yyyy-mm-dd hh:mm:ss" More... | |
static | _getLocalChangesByModule (string $a_key, string $a_module) |
Get the local changes of a language module $a_key Language key $a_module Module key Return array identifier => value. More... | |
static | replaceLangEntry (string $a_module, string $a_identifier, string $a_lang_key, string $a_value, string $a_local_change=null, string $a_remarks=null) |
Replace lang entry. More... | |
static | updateLangEntry (string $a_module, string $a_identifier, string $a_lang_key, string $a_value, string $a_local_change=null, string $a_remarks=null) |
Replace lang entry. More... | |
static | deleteLangEntry (string $a_module, string $a_identifier, string $a_lang_key) |
Delete lang entry. More... | |
static | cut_header (array $content) |
remove lang-file haeder information from '$content' This function seeks for a special keyword where the language information starts. More... | |
static | countUsers (string $a_lang) |
Count number of users that use a language. More... | |
![]() | |
static | _lookupObjIdByImportId (string $import_id) |
Get (latest) object id for an import id. More... | |
static | _lookupImportId (int $obj_id) |
static | _lookupOwnerName (int $owner_id) |
Lookup owner name for owner id. More... | |
static | _getIdForImportId (string $import_id) |
static | _getAllReferences (int $id) |
get all reference ids for object ID More... | |
static | _lookupTitle (int $obj_id) |
static | lookupOfflineStatus (int $obj_id) |
Lookup offline status using objectDataCache. More... | |
static | _lookupOwner (int $obj_id) |
Lookup owner user ID for object ID. More... | |
static | _getIdsForTitle (string $title, string $type='', bool $partial_match=false) |
static | _lookupDescription (int $obj_id) |
static | _lookupLastUpdate (int $obj_id, bool $formatted=false) |
static | _getLastUpdateOfObjects (array $obj_ids) |
static | _lookupObjId (int $ref_id) |
static | _setDeletedDate (int $ref_id, int $deleted_by) |
static | setDeletedDates (array $ref_ids, int $user_id) |
static | _resetDeletedDate (int $ref_id) |
static | _lookupDeletedDate (int $ref_id) |
static | _writeTitle (int $obj_id, string $title) |
write title to db (static) More... | |
static | _writeDescription (int $obj_id, string $desc) |
write description to db (static) More... | |
static | _writeImportId (int $obj_id, string $import_id) |
write import id to db (static) More... | |
static | _lookupType (int $id, bool $reference=false) |
static | _isInTrash (int $ref_id) |
static | _hasUntrashedReference (int $obj_id) |
checks whether an object has at least one reference that is not in trash More... | |
static | _lookupObjectId (int $ref_id) |
static | _getObjectsDataForType (string $type, bool $omit_trash=false) |
get all objects of a certain type More... | |
static | _exists (int $id, bool $reference=false, ?string $type=null) |
checks if an object exists in object_data More... | |
static | _getObjectsByType (string $obj_type="", int $owner=null) |
static | _prepareCloneSelection (array $ref_ids, string $new_type, bool $show_path=true) |
Prepare copy wizard object selection. More... | |
static | _getIcon (int $obj_id=0, string $size="big", string $type="", bool $offline=false) |
Get icon for repository item. More... | |
static | collectDeletionDependencies (array &$deps, int $ref_id, int $obj_id, string $type, int $depth=0) |
Collect deletion dependencies. More... | |
static | getDeletionDependencies (int $obj_id) |
Get deletion dependencies. More... | |
static | getLongDescriptions (array $obj_ids) |
static | getAllOwnedRepositoryObjects (int $user_id) |
static | fixMissingTitles ($type, array &$obj_title_map) |
Try to fix missing object titles. More... | |
static | _lookupCreationDate (int $obj_id) |
static | _getObjectTypeIdByTitle (string $type, \ilDBInterface $ilDB=null) |
|
static |
Delete a set of translation in the database.
$a_lang_key language key $a_values module.separator.topic => value
Definition at line 477 of file class.ilObjLanguageExt.php.
References $DIC, $ilDB, ilObjLanguage\$key, $keys, ilObject\$lng, and ilObjLanguage\deleteLangEntry().
Referenced by ilObjLanguageExtGUI\maintainExecuteObject().
|
static |
Get all modules of a language.
$a_lang_key language key Return list of modules
Definition at line 296 of file class.ilObjLanguageExt.php.
References $DIC, $ilDB, and ilDBConstants\FETCHMODE_ASSOC.
Referenced by ilLanguageExtTableGUI\initFilter(), and ilObjLanguageExtGUI\statisticsObject().
|
static |
Get all remarks of a language.
$a_lang_key language key $a_all_changed include empty remarks for local changes Return array module.separator.topic => remarks
Definition at line 320 of file class.ilObjLanguageExt.php.
References $DIC, $ilDB, and ilObject\$lng.
Referenced by ilObjLanguageExtGUI\viewObject().
|
static |
Get the translations of specified topics.
$a_lang_key language key $a_modules list of modules $a_topics list of topics $a_pattern search pattern $a_state local change state ('changed', 'unchanged', '') Return array module.separator.topic => value
Definition at line 356 of file class.ilObjLanguageExt.php.
References $DIC, $ilDB, ilObject\$lng, and ilDBConstants\FETCHMODE_ASSOC.
Referenced by ilObjLanguageExtGUI\viewObject().
|
static |
Save a set of translation in the database.
$a_lang_key language key $a_values module.separator.topic => value $a_remarks module.separator.topic => remarks
Definition at line 403 of file class.ilObjLanguageExt.php.
References $DIC, $ilDB, ilObjLanguage\$key, $keys, ilObject\$lng, ilLanguageFile\_getGlobalLanguageFile(), ilCachedLanguage\getInstance(), and ilObjLanguage\replaceLangEntry().
Referenced by ilObjLanguageExtGUI\saveObject().
ilObjLanguageExt::getAddedValues | ( | array | $a_modules = array() , |
string | $a_pattern = '' , |
||
array | $a_topics = array() |
||
) |
Get only the entries which don't exist in the global language file.
$a_modules list of modules $a_pattern search pattern $a_topics list of topics Return array module.separator.topic => value
Definition at line 159 of file class.ilObjLanguageExt.php.
References getGlobalLanguageFile().
ilObjLanguageExt::getAllRemarks | ( | ) |
Get all remarks from the database.
Return array module.separator.topic => remark
Definition at line 106 of file class.ilObjLanguageExt.php.
ilObjLanguageExt::getAllValues | ( | array | $a_modules = array() , |
string | $a_pattern = "" , |
||
array | $a_topics = array() |
||
) |
Get all values from the database.
$a_modules list of modules $a_pattern search pattern $a_topics list of topics Return array module.separator.topic => value
Definition at line 119 of file class.ilObjLanguageExt.php.
Referenced by getMergedRemarks().
ilObjLanguageExt::getChangedValues | ( | array | $a_modules = array() , |
string | $a_pattern = "" , |
||
array | $a_topics = array() |
||
) |
Get only the changed values from the database which differ from the original language file.
$a_modules list of modules $a_pattern search pattern $a_topics list of topics Return array module.separator.topic => value
Definition at line 134 of file class.ilObjLanguageExt.php.
Referenced by getMergedRemarks().
ilObjLanguageExt::getCommentedValues | ( | array | $a_modules = array() , |
string | $a_pattern = "" , |
||
array | $a_topics = array() |
||
) |
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!
$a_modules list of modules $a_pattern search pattern $a_topics list of topics Return array module.separator.topic => value
Definition at line 180 of file class.ilObjLanguageExt.php.
References getGlobalLanguageFile().
ilObjLanguageExt::getCustLangPath | ( | ) |
Get the customized language files path.
Return path of customized language files folder
Definition at line 96 of file class.ilObjLanguageExt.php.
References ilObjLanguage\$cust_lang_path.
ilObjLanguageExt::getDataPath | ( | ) |
Return the path for language data written by ILIAS.
Definition at line 73 of file class.ilObjLanguageExt.php.
References CLIENT_DATA_DIR, and ilFileUtils\makeDir().
ilObjLanguageExt::getGlobalLanguageFile | ( | ) |
Read and get the global language file as an object.
Definition at line 35 of file class.ilObjLanguageExt.php.
References ilLanguageFile\_getGlobalLanguageFile().
Referenced by getAddedValues(), getCommentedValues(), getMergedRemarks(), and getMergedValues().
ilObjLanguageExt::getLangPath | ( | ) |
Get the language files path.
Return path of language files folder
Definition at line 86 of file class.ilObjLanguageExt.php.
References ilObjLanguage\$lang_path.
ilObjLanguageExt::getLongDescription | ( | ) |
Get the full language description.
Return description
Definition at line 64 of file class.ilObjLanguageExt.php.
References ILIAS\Repository\lng().
ilObjLanguageExt::getMergedRemarks | ( | ) |
Get the local remarks merged into the remarks of the global language file.
The returned array contains:
Return array module.separator.topic => value
Definition at line 221 of file class.ilObjLanguageExt.php.
References $DIC, $ilDB, $ilErr, ilObjLanguage\$key, ilObjLanguage\_deleteLangData(), getAllValues(), getChangedValues(), and getGlobalLanguageFile().
ilObjLanguageExt::getMergedValues | ( | ) |
Get the local values merged into the values of the global language file.
The returned array contains:
Return array module.separator.topic => value
Definition at line 201 of file class.ilObjLanguageExt.php.
References getGlobalLanguageFile().
ilObjLanguageExt::getUnchangedValues | ( | array | $a_modules = array() , |
string | $a_pattern = "" , |
||
array | $a_topics = array() |
||
) |
Get only the unchanged values from the database which are equal to the original language file.
Return array module.separator.topic => value
Definition at line 146 of file class.ilObjLanguageExt.php.
ilObjLanguageExt::setLocal | ( | bool | $a_local = true | ) |
Set the local status of the language.
$a_local local status (true/false)
Definition at line 46 of file class.ilObjLanguageExt.php.
References ilObjLanguage\isInstalled(), ilObject\setDescription(), and ilObject\update().