|
static | load ($object_id, $table='', $field='', $base=null) |
|
static | fetchDataForField ($object_id, $table, $field) |
|
static | fetchDataForRow ($object_id, $table) |
|
static | removeAllTranslations ($object_id, $table, $lang=null) |
|
static | setContentLanguage ($language) |
|
static | getContentLanguage () |
|
static | setDefaultLanguage ($language=null) |
|
static | getDefaultLanguage () |
|
static | load ($object_id, $table, $field, $base=null) |
|
static | fetchDataForField ($object_id, $table, $field) |
|
static | fetchDataForRow ($object_id, $table) |
|
static | removeAllTranslations ($object_id, $table, $lang=null) |
|
◆ fetchDataForField()
static fetchDataForField |
( |
|
$object_id, |
|
|
|
$table, |
|
|
|
$field |
|
) |
| |
|
static |
Retrieves all translations for one field.
- Parameters
-
string | $object_id | The id of the object with i18n fields. |
string | $table | The name of the table with the original values. |
string | $field | The name oof the i18n field. |
- Returns
- array An array with language as key and translation as value.
◆ fetchDataForRow()
static fetchDataForRow |
( |
|
$object_id, |
|
|
|
$table |
|
) |
| |
|
static |
This function is not used in the context of datafields, so it always returns an empty array.
- Parameters
-
string | $object_id | The id of the object with i18n fields. |
string | $table | The name of the table with the original values. |
- Returns
- array An empty array.
◆ load()
static load |
( |
|
$object_id, |
|
|
|
$table = '' , |
|
|
|
$field = '' , |
|
|
|
$base = null |
|
) |
| |
|
static |
Returns an I18NString object by given object_id, table and field.
- Parameters
-
string | $object_id | The id of the object with i18n fields. |
string | $table | The name of the table with the original values. |
string | $field | The name of the i18n field. |
string | $base | Sets the original value or retrieve it from database if null. |
- Returns
- I18NString The I18NString object.
◆ removeAllTranslations()
static removeAllTranslations |
( |
|
$object_id, |
|
|
|
$table, |
|
|
|
$lang = null |
|
) |
| |
|
static |
Removes all translations by given object id and table name. Accepts the language as third parameter to remove only translations to this language.
- Parameters
-
string | $object_id | The id of the sorm object. |
string | $table | The table name. |
string | $lang | Optional name of language. |
- Returns
- int The number of deleted translations.
◆ setMetadata()
Sets the metadata (database info object_id) of this i18n datafield.
- Parameters
-
array | $metadata | Database info for object_id. |
◆ storeTranslations()
Stores the i18n String manually in the database
◆ toArray()
Return an array containg the text in all additional languages.
- Returns
- array
The documentation for this class was generated from the following file: