ILIAS
release_5-2 Revision v5.2.25-18-g3f80b828510
|
Class handles translation mode for an object. More...
Public Member Functions | |
setObjId ($a_val) | |
Set object id. More... | |
getObjId () | |
Get object id. More... | |
setLanguages (array $a_val) | |
Set languages. More... | |
getLanguages () | |
Get languages. More... | |
getType () | |
setType ($type) | |
getDefaultLanguage () | |
addLanguage ($a_lang, $a_title, $a_description, $a_default, $a_force=false) | |
Add language. More... | |
getDefaultTitle () | |
Get default title. More... | |
setDefaultTitle ($a_title) | |
Set default title. More... | |
getDefaultDescription () | |
Get default description. More... | |
setDefaultDescription ($a_description) | |
Set default description. More... | |
removeLanguage ($a_lang) | |
Remove language. More... | |
read () | |
Read. More... | |
delete () | |
Delete. More... | |
save () | |
Save. More... | |
copy ($a_obj_id) | |
Copy multilinguality settings. More... | |
toXml (ilXmlWriter $writer) | |
Export. More... | |
fromXML (SimpleXMLElement $root) | |
xml import More... | |
Static Public Member Functions | |
static | getInstance ($a_obj_id, $a_type) |
Get instance. More... | |
Protected Attributes | |
$db | |
$obj_id | |
$languages = array() | |
$type = "" | |
Static Protected Attributes | |
static | $instances = array() |
Private Member Functions | |
__construct ($a_obj_id, $a_type) | |
Constructor. More... | |
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.ilMultilingualism.php.
|
private |
Constructor.
int | $a_obj_id | object id |
string | $a_type | id type |
ilObjectException |
Definition at line 44 of file class.ilMultilingualism.php.
References $a_type, $ilDB, getObjId(), read(), setObjId(), and setType().
ilMultilingualism::addLanguage | ( | $a_lang, | |
$a_title, | |||
$a_description, | |||
$a_default, | |||
$a_force = false |
|||
) |
Add language.
string | $a_lang | language |
string | $a_title | title |
string | $a_description | description |
bool | $a_default | default language? |
Definition at line 159 of file class.ilMultilingualism.php.
Referenced by fromXML(), and read().
ilMultilingualism::copy | ( | $a_obj_id | ) |
Copy multilinguality settings.
string | $a_type | parent object type |
int | $a_obj_id | parent object id |
Definition at line 310 of file class.ilMultilingualism.php.
References getLanguages(), and getType().
ilMultilingualism::delete | ( | ) |
Delete.
Definition at line 274 of file class.ilMultilingualism.php.
ilMultilingualism::fromXML | ( | SimpleXMLElement | $root | ) |
xml import
SimpleXMLElement | $root |
Definition at line 347 of file class.ilMultilingualism.php.
References addLanguage().
ilMultilingualism::getDefaultDescription | ( | ) |
Get default description.
Definition at line 213 of file class.ilMultilingualism.php.
References $l.
ilMultilingualism::getDefaultLanguage | ( | ) |
Definition at line 135 of file class.ilMultilingualism.php.
References $lng.
Referenced by removeLanguage().
ilMultilingualism::getDefaultTitle | ( | ) |
Get default title.
Definition at line 180 of file class.ilMultilingualism.php.
References $l.
|
static |
Get instance.
integer | $a_obj_id | (repository) object id |
Definition at line 68 of file class.ilMultilingualism.php.
References $a_type.
Referenced by ilMultilingualismGUI\__construct(), ilDidacticTemplateSetting\getTranslationObject(), and ilDidacticTemplateImport\parseSettings().
ilMultilingualism::getLanguages | ( | ) |
Get languages.
Definition at line 114 of file class.ilMultilingualism.php.
References $languages.
Referenced by copy(), save(), and toXml().
ilMultilingualism::getObjId | ( | ) |
Get object id.
Definition at line 94 of file class.ilMultilingualism.php.
References $obj_id.
Referenced by __construct().
ilMultilingualism::getType | ( | ) |
Definition at line 122 of file class.ilMultilingualism.php.
References $type.
Referenced by copy().
ilMultilingualism::read | ( | ) |
Read.
Definition at line 258 of file class.ilMultilingualism.php.
References addLanguage(), array, and setLanguages().
Referenced by __construct().
ilMultilingualism::removeLanguage | ( | $a_lang | ) |
Remove language.
string | $a_lang | language code |
Definition at line 247 of file class.ilMultilingualism.php.
References getDefaultLanguage().
ilMultilingualism::save | ( | ) |
Save.
Definition at line 285 of file class.ilMultilingualism.php.
References $l, $t, and getLanguages().
ilMultilingualism::setDefaultDescription | ( | $a_description | ) |
Set default description.
string | $a_description | description |
Definition at line 230 of file class.ilMultilingualism.php.
References $l.
ilMultilingualism::setDefaultTitle | ( | $a_title | ) |
Set default title.
string | $a_title | title |
Definition at line 197 of file class.ilMultilingualism.php.
References $l.
ilMultilingualism::setLanguages | ( | array | $a_val | ) |
Set languages.
array | $a_val | array of language codes |
Definition at line 104 of file class.ilMultilingualism.php.
Referenced by read().
ilMultilingualism::setObjId | ( | $a_val | ) |
Set object id.
int | $a_val | object id |
Definition at line 84 of file class.ilMultilingualism.php.
Referenced by __construct().
ilMultilingualism::setType | ( | $type | ) |
string | $type |
Definition at line 130 of file class.ilMultilingualism.php.
References $type.
Referenced by __construct().
ilMultilingualism::toXml | ( | ilXmlWriter | $writer | ) |
Export.
ilXmlWriter | $writer |
Definition at line 325 of file class.ilMultilingualism.php.
References array, getLanguages(), ilXmlWriter\xmlElement(), ilXmlWriter\xmlEndTag(), and ilXmlWriter\xmlStartTag().
|
protected |
Definition at line 31 of file class.ilMultilingualism.php.
|
staticprotected |
Definition at line 35 of file class.ilMultilingualism.php.
|
protected |
Definition at line 33 of file class.ilMultilingualism.php.
Referenced by getLanguages().
|
protected |
Definition at line 32 of file class.ilMultilingualism.php.
Referenced by getObjId().
|
protected |
Definition at line 34 of file class.ilMultilingualism.php.