class static
meteoJS/base/uniquenamed . UniqueNamed
Source: base/
Class that describe objects with an unique id and with names.
Properties
new UniqueNamed([options])
Parameter
Name | Type | Optional | Description |
---|---|---|---|
options |
|
Yes |
Options. |
Properties
id unknown
Id.
- Inherited from
- module:meteoJS/base/unique.Unique#id
langSortation unknown
Default order of the languages.
- Inherited from
- module:meteoJS/base/named.Named#langSortation
name unknown
Default name.
- Inherited from
- module:meteoJS/base/named.Named#name
Methods
getDefaultName()
getNameByLang([lang][, options]) → string
Returns a name, if available in the passed language, otherwise in a fallback language.
Parameters
Name | Type | Optional | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
lang |
|
Yes |
Language code. |
||||||||
options |
|
Yes |
Options. Values in
|
- Inherited from
- module:meteoJS/base/named.Named#getNameByLang
- Returns
-
Name in the passed or a fallback language.
getNameByLangNoFallback(lang) → string
Returns the name in the passed language.
Parameter
Name | Type | Optional | Description |
---|---|---|---|
lang |
|
|
Language code. |
- Inherited from
- module:meteoJS/base/named.Named#getNameByLangNoFallback
- Returns
-
Name in the passed language.
setId()
setNameByLang(lang, name)
Sets the name of a certain language. Pass undefined to delete name.
Parameters
Name | Type | Optional | Description |
---|---|---|---|
lang |
|
|
Language code. |
name |
|
|
Name. |
- Inherited from
- module:meteoJS/base/named.Named#setNameByLang