ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
|
Class ilObjLanguage. More...
Public Member Functions | |
__construct ($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... | |
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... | |
optimizeData () | |
optimizes the db-table langdata More... | |
check ($scope='') | |
Validate the logical structure of a lang file. More... | |
Public Member Functions inherited from ilObject | |
__construct ($a_id=0, $a_reference=true) | |
Constructor public. More... | |
withReferences () | |
determines wehter objects are referenced or not (got ref ids or not) More... | |
read () | |
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 () | |
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... | |
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... | |
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... | |
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... | |
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. More... | |
cloneDependencies ($a_target_id, $a_copy_id) | |
Clone object dependencies. More... | |
cloneMetaData ($target_obj) | |
Copy meta data. More... | |
getPossibleSubObjects ($a_filter=true) | |
get all possible subobjects of this type the object can decide which types of subobjects are possible jut in time overwrite if the decision distinguish from standard model More... | |
Static Public Member Functions | |
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 | _getLastLocalChange ($a_key) |
get the date of the last local change 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 | cut_header ($content) |
remove lang-file haeder information from '$content' This function seeks for a special keyword where the language information starts. More... | |
static | countUsers ($a_lang) |
Count number of users that use a language. More... | |
Static Public Member Functions inherited from ilObject | |
static | _lookupObjIdByImportId ($a_import_id) |
static | _lookupImportId ($a_obj_id) |
static | _lookupOwnerName ($a_owner_id) |
lookup owner name for owner id More... | |
static | _getIdForImportId ($a_import_id) |
get current object id for import id (static) More... | |
static | _getAllReferences ($a_id) |
get all reference ids of object More... | |
static | _lookupTitle ($a_id) |
lookup object title More... | |
static | _lookupOwner ($a_id) |
lookup object owner More... | |
static | _getIdsForTitle ($title, $type='', $partialmatch=false) |
static | _lookupDescription ($a_id) |
lookup object description More... | |
static | _lookupLastUpdate ($a_id, $a_as_string=false) |
lookup last update More... | |
static | _getLastUpdateOfObjects ($a_objs) |
Get last update for a set of media objects. More... | |
static | _lookupObjId ($a_id) |
static | _setDeletedDate ($a_ref_id) |
only called in ilTree::saveSubTree More... | |
static | setDeletedDates ($a_ref_ids) |
Set deleted date type $ilDB. More... | |
static | _resetDeletedDate ($a_ref_id) |
only called in ilObjectGUI::insertSavedNodes More... | |
static | _lookupDeletedDate ($a_ref_id) |
only called in ilObjectGUI::insertSavedNodes More... | |
static | _writeTitle ($a_obj_id, $a_title) |
write title to db (static) More... | |
static | _writeDescription ($a_obj_id, $a_desc) |
write description to db (static) More... | |
static | _writeImportId ($a_obj_id, $a_import_id) |
write import id to db (static) More... | |
static | _lookupType ($a_id, $a_reference=false) |
lookup object type More... | |
static | _isInTrash ($a_ref_id) |
checks wether object is in trash More... | |
static | _hasUntrashedReference ($a_obj_id) |
checks wether an object has at least one reference that is not in trash More... | |
static | _lookupObjectId ($a_ref_id) |
lookup object id More... | |
static | _getObjectsDataForType ($a_type, $a_omit_trash=false) |
get all objects of a certain type 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 | fixMissingTitles ($a_type, array &$a_obj_title_map) |
Try to fix missing object titles. More... | |
static | _lookupCreationDate ($a_id) |
Lookup creation date. More... | |
static | hasAutoRating ($a_type, $a_ref_id) |
Check if auto rating is active for parent group/course. More... | |
Data Fields | |
$separator | |
$comment_separator | |
$lang_default | |
$lang_user | |
$lang_path | |
$key | |
$status | |
Data Fields inherited from ilObject | |
const | TITLE_LENGTH = 255 |
max length of object title More... | |
const | DESC_LENGTH = 128 |
$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 | |
Additional Inherited Members | |
Protected Attributes inherited from ilObject | |
$objDefinition | |
$db | |
$log | |
$error | |
$tree | |
$app_event_handler | |
$rbacadmin | |
$rbacreview | |
ilObjLanguage::__construct | ( | $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 40 of file class.ilObjLanguage.php.
References ilObject\$desc, ilObject\$lng, and ilObject\$title.
|
static |
Delete languge data.
string | lang key |
Definition at line 301 of file class.ilObjLanguage.php.
References $ilDB.
Referenced by flush(), and ilObjLanguageExt\importLanguageFile().
|
static |
get the date of the last local change
string | language key |
Definition at line 370 of file class.ilObjLanguage.php.
References $ilDB, $result, $row, array, and ilDBConstants\FETCHMODE_ASSOC.
Referenced by ilObjLanguageFolderGUI\confirmRefreshSelectedObject(), and ilLanguageTableGUI\fillRow().
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 785 of file class.ilObjLanguage.php.
References $key, $lang_path, $n, $path, cut_header(), file, and ilStr\isUtf8().
Referenced by install(), and refresh().
|
static |
Count number of users that use a language.
Definition at line 849 of file class.ilObjLanguage.php.
References $ilDB, and ilObject\$lng.
Referenced by ilLanguageTableGUI\fillRow().
|
static |
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 753 of file class.ilObjLanguage.php.
References $key.
Referenced by check(), ilObjLanguageFolder\checkAllLanguages(), and insert().
|
staticfinal |
Delete lang entry.
Definition at line 712 of file class.ilObjLanguage.php.
References $ilDB.
Referenced by ilObjLanguageExt\_deleteValues().
ilObjLanguage::flush | ( | $a_mode = 'all' | ) |
remove language data from database
string | "all" or "keep_local" |
Definition at line 318 of file class.ilObjLanguage.php.
References $ilDB, and _deleteLangData().
Referenced by install(), refresh(), and uninstall().
|
static |
Get the language objects of the installed languages.
Definition at line 63 of file class.ilObjLanguage.php.
References $lang, ilObject\_getObjectsByType(), and array.
Referenced by ilPlugin\updateLanguages().
ilObjLanguage::getKey | ( | ) |
get language key
Definition at line 84 of file class.ilObjLanguage.php.
References $key.
Referenced by install(), and refresh().
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 337 of file class.ilObjLanguage.php.
References $ilDB, $result, $row, array, and ilDBConstants\FETCHMODE_ASSOC.
Referenced by insert().
ilObjLanguage::getStatus | ( | ) |
get language status
Definition at line 94 of file class.ilObjLanguage.php.
References $status.
Referenced by isInstalled(), isLocal(), and refresh().
ilObjLanguage::insert | ( | $scope = '' | ) |
insert language data from file into database
string | $scope | empty (global) or "local" |
Definition at line 419 of file class.ilObjLanguage.php.
References $DIC, $ilDB, $ilErr, $key, $lang_path, $module, $path, $query, $result, $row, array, cut_header(), date, file, getLocalChanges(), replaceLangEntry(), and time.
Referenced by install(), and refresh().
ilObjLanguage::install | ( | $scope = '' | ) |
install current language
string | $scope | empty (global) or "local" |
Definition at line 159 of file class.ilObjLanguage.php.
References check(), flush(), getKey(), insert(), isInstalled(), isLocal(), ilObject\setDescription(), and ilObject\update().
ilObjLanguage::isInstalled | ( | ) |
Check language object status, and return true if language is installed.
Definition at line 129 of file class.ilObjLanguage.php.
References getStatus().
Referenced by install(), refresh(), and ilObjLanguageExt\setLocal().
ilObjLanguage::isLocal | ( | ) |
Check language object status, and return true if a local language file is installed.
Definition at line 144 of file class.ilObjLanguage.php.
References getStatus().
Referenced by install(), and refresh().
ilObjLanguage::isSystemLanguage | ( | ) |
check if language is system language
Definition at line 102 of file class.ilObjLanguage.php.
ilObjLanguage::isUserLanguage | ( | ) |
check if language is system language
Definition at line 114 of file class.ilObjLanguage.php.
ilObjLanguage::optimizeData | ( | ) |
optimizes the db-table langdata
Definition at line 770 of file class.ilObjLanguage.php.
ilObjLanguage::refresh | ( | ) |
refresh current language
Definition at line 219 of file class.ilObjLanguage.php.
References check(), flush(), getKey(), getStatus(), insert(), isInstalled(), isLocal(), ilObject\setDescription(), ilObject\setTitle(), and ilObject\update().
|
static |
Refresh all installed languages.
Definition at line 246 of file class.ilObjLanguage.php.
References $lang, ilObject\_getObjectsByType(), and array.
Referenced by ilObjLanguageFolderGUI\refreshObject().
|
static |
Definition at line 267 of file class.ilObjLanguage.php.
References ilPluginSlot\getAllSlots(), and ilPlugin\getPluginObject().
Referenced by ilObjLanguageFolderGUI\refreshSelectedObject().
|
staticfinal |
Replace lang entry.
Definition at line 611 of file class.ilObjLanguage.php.
Referenced by ilObjLanguageExt\_saveValues(), insert(), ilObjLanguageExtGUI\saveNewEntryObject(), and 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 734 of file class.ilObjLanguage.php.
Referenced by uninstall().
ilObjLanguage::uninstall | ( | ) |
uninstall current language
Definition at line 200 of file class.ilObjLanguage.php.
References $key, flush(), resetUserLanguage(), ilObject\setDescription(), ilObject\setTitle(), and ilObject\update().
|
staticfinal |
ilObjLanguage::$comment_separator |
Definition at line 24 of file class.ilObjLanguage.php.
ilObjLanguage::$key |
Definition at line 29 of file class.ilObjLanguage.php.
Referenced by ilObjLanguageExt\_deleteValues(), ilObjLanguageExt\_saveValues(), check(), cut_header(), getKey(), ilObjLanguageExt\importLanguageFile(), insert(), and uninstall().
ilObjLanguage::$lang_default |
Definition at line 25 of file class.ilObjLanguage.php.
ilObjLanguage::$lang_path |
Definition at line 27 of file class.ilObjLanguage.php.
Referenced by check(), ilObjLanguageExt\getLangPath(), and insert().
ilObjLanguage::$lang_user |
Definition at line 26 of file class.ilObjLanguage.php.
ilObjLanguage::$separator |
Definition at line 23 of file class.ilObjLanguage.php.
ilObjLanguage::$status |
Definition at line 30 of file class.ilObjLanguage.php.
Referenced by getStatus().