ILIAS
Release_5_0_x_branch Revision 61816
|
Class handles translation mode for an object. More...
Public Member Functions | |
setObjId ($a_val) | |
Set object id. | |
getObjId () | |
Get object id. | |
setMasterLanguage ($a_val) | |
Set master language. | |
getMasterLanguage () | |
Get master language. | |
setLanguages (array $a_val) | |
Set languages. | |
getLanguages () | |
Get languages. | |
addLanguage ($a_lang, $a_title, $a_description, $a_default) | |
Add language. | |
getDefaultTitle () | |
Get default title. | |
setDefaultTitle ($a_title) | |
Set default title. | |
getDefaultDescription () | |
Get default description. | |
setDefaultDescription ($a_description) | |
Set default description. | |
removeLanguage ($a_lang) | |
Remove language. | |
getContentActivated () | |
Get activated for content. | |
read () | |
Read. | |
delete () | |
Delete. | |
deactivateContentTranslation () | |
Deactivate content translation. | |
save () | |
Save. | |
copy ($a_obj_id) | |
Copy multilinguality settings. | |
getEffectiveContentLang ($a_lang, $a_parent_type) | |
Get effective language for given language. |
Static Public Member Functions | |
static | getInstance ($a_obj_id) |
Get instance. |
Protected Member Functions | |
setContentActivated ($a_val) | |
Set activated for content. |
Protected Attributes | |
$db | |
$obj_id | |
$master_lang | |
$languages = array() | |
$content_activated = false |
Static Protected Attributes | |
static | $instances = array() |
Private Member Functions | |
__construct ($a_obj_id) | |
Constructor. |
Class handles translation mode for an object.
Objects may not use any translations at all
Currently supported by container objects and ILIAS learning modules.
Content master lang vs. default language
Definition at line 29 of file class.ilObjectTranslation.php.
|
private |
Constructor.
int | $a_obj_id | object id |
ilObjectException |
Definition at line 44 of file class.ilObjectTranslation.php.
References $ilDB, getObjId(), read(), and setObjId().
ilObjectTranslation::addLanguage | ( | $a_lang, | |
$a_title, | |||
$a_description, | |||
$a_default | |||
) |
Add language.
string | $a_lang | language |
string | $a_title | title |
string | $a_description | description |
bool | $a_default | default language? |
Definition at line 146 of file class.ilObjectTranslation.php.
Referenced by read().
ilObjectTranslation::copy | ( | $a_obj_id | ) |
Copy multilinguality settings.
string | $a_target_parent_type | parent object type |
int | $a_target_parent_id | parent object id |
Definition at line 368 of file class.ilObjectTranslation.php.
References getLanguages(), and getMasterLanguage().
ilObjectTranslation::deactivateContentTranslation | ( | ) |
Deactivate content translation.
Definition at line 307 of file class.ilObjectTranslation.php.
ilObjectTranslation::delete | ( | ) |
Delete.
Definition at line 294 of file class.ilObjectTranslation.php.
ilObjectTranslation::getContentActivated | ( | ) |
Get activated for content.
Definition at line 258 of file class.ilObjectTranslation.php.
References $content_activated.
Referenced by getEffectiveContentLang().
ilObjectTranslation::getDefaultDescription | ( | ) |
Get default description.
Definition at line 200 of file class.ilObjectTranslation.php.
ilObjectTranslation::getDefaultTitle | ( | ) |
Get default title.
Definition at line 167 of file class.ilObjectTranslation.php.
ilObjectTranslation::getEffectiveContentLang | ( | $a_lang, | |
$a_parent_type | |||
) |
Get effective language for given language.
This checks if
string | $a_lang | language |
string | $a_parent_type | page parent type |
Definition at line 388 of file class.ilObjectTranslation.php.
References ilPageObject\_exists(), getContentActivated(), getLanguages(), and getObjId().
|
static |
Get instance.
integer | $a_obj_id | (repository) object id |
Definition at line 67 of file class.ilObjectTranslation.php.
Referenced by ilObjectTranslationGUI\__construct(), ilPageMultiLangGUI\__construct(), ilStructureObject\_getPresentationTitle(), ilLMPageObject\_getPresentationTitle(), ilPageObjectGUI\addMultiLangActionsAndInfo(), ilObjCategory\cloneObject(), ilObjContentObject\cloneObject(), ilObjContentObjectGUI\executeCommand(), ilObjContentObject\exportHTML(), ilObjContentObjectGUI\exportHTML(), ilContainerGUI\getContainerPageHTML(), ilObjContentObjectGUI\getMultiLangHeader(), ilObjContentObjectGUI\getPropertiesFormValues(), ilLMPresentationGUI\ilLMPresentationGUI(), and ilObjContentObjectGUI\saveProperties().
ilObjectTranslation::getLanguages | ( | ) |
Get languages.
Definition at line 133 of file class.ilObjectTranslation.php.
References $languages.
Referenced by copy(), getEffectiveContentLang(), and save().
ilObjectTranslation::getMasterLanguage | ( | ) |
Get master language.
Definition at line 113 of file class.ilObjectTranslation.php.
References $master_lang.
Referenced by copy(), removeLanguage(), and save().
ilObjectTranslation::getObjId | ( | ) |
Get object id.
Definition at line 93 of file class.ilObjectTranslation.php.
References $obj_id.
Referenced by __construct(), and getEffectiveContentLang().
ilObjectTranslation::read | ( | ) |
Read.
Definition at line 266 of file class.ilObjectTranslation.php.
References addLanguage(), setContentActivated(), setLanguages(), and setMasterLanguage().
Referenced by __construct().
ilObjectTranslation::removeLanguage | ( | $a_lang | ) |
Remove language.
string | $a_lang | language code |
Definition at line 234 of file class.ilObjectTranslation.php.
References getMasterLanguage().
ilObjectTranslation::save | ( | ) |
Save.
Definition at line 317 of file class.ilObjectTranslation.php.
References getLanguages(), and getMasterLanguage().
|
protected |
Set activated for content.
bool | $a_val | activated for content? |
Definition at line 248 of file class.ilObjectTranslation.php.
Referenced by read().
ilObjectTranslation::setDefaultDescription | ( | $a_description | ) |
Set default description.
string | $a_description | description |
Definition at line 217 of file class.ilObjectTranslation.php.
ilObjectTranslation::setDefaultTitle | ( | $a_title | ) |
Set default title.
string | $a_title | title |
Definition at line 184 of file class.ilObjectTranslation.php.
ilObjectTranslation::setLanguages | ( | array | $a_val | ) |
Set languages.
array | $a_val | array of language codes |
Definition at line 123 of file class.ilObjectTranslation.php.
Referenced by read().
ilObjectTranslation::setMasterLanguage | ( | $a_val | ) |
Set master language.
string | $a_val | master language |
Definition at line 103 of file class.ilObjectTranslation.php.
Referenced by read().
ilObjectTranslation::setObjId | ( | $a_val | ) |
Set object id.
int | $a_val | object id |
Definition at line 83 of file class.ilObjectTranslation.php.
Referenced by __construct().
|
protected |
Definition at line 35 of file class.ilObjectTranslation.php.
Referenced by getContentActivated().
|
protected |
Definition at line 31 of file class.ilObjectTranslation.php.
|
staticprotected |
Definition at line 36 of file class.ilObjectTranslation.php.
|
protected |
Definition at line 34 of file class.ilObjectTranslation.php.
Referenced by getLanguages().
|
protected |
Definition at line 33 of file class.ilObjectTranslation.php.
Referenced by getMasterLanguage().
|
protected |
Definition at line 32 of file class.ilObjectTranslation.php.
Referenced by getObjId().