Definition at line 10 of file oxi18n.php.
Public Member Functions | |
__construct () | |
setLanguage ($iLang=null) | |
getLanguage () | |
setEnableMultilang ($blEmployMultilanguage) | |
isMultilingualField ($sFieldName) | |
isMultilang () | |
loadInLang ($iLanguage, $sOxid) | |
modifyCacheKey ($sCacheKey, $blOverride=false) | |
load ($sOXID) | |
assign ($dbRecord) | |
getAvailableInLangs () | |
getSqlFieldName ($sField) | |
getSqlActiveSnippet ($blForceCoreTable=false) | |
Protected Member Functions | |
_getFieldStatus ($sFieldName) | |
_getNonCachedFieldNames ($blForceFullStructure=false) | |
_getFieldLang ($sFieldName) | |
_update () | |
Protected Attributes | |
$_sClassName = 'oxI18n' | |
$_iLanguage = null | |
$_blEmployMultilanguage = true |
oxI18n.__construct | ( | ) |
Class constructor, initiates parent constructor (parent.oxBase()).
Reimplemented from oxBase.
Reimplemented in oxAttribute, oxCategory, oxContent, oxCountry, oxDelivery, oxDeliverySet, oxDiscount, oxLinks, oxManufacturer, oxMediaUrl, oxNews, oxPayment, oxShop, oxSimpleVariant, oxVendor, and oxWrapping.
Definition at line 35 of file oxi18n.php.
oxI18n.setLanguage | ( | $ | iLang = null |
) |
Sets object language.
string | $iLang string (default null) |
Definition at line 56 of file oxi18n.php.
oxI18n.getLanguage | ( | ) |
oxI18n.setEnableMultilang | ( | $ | blEmployMultilanguage | ) |
Object multilanguage mode setter (set true to enable multilang mode). This setter affects init() method so it should be called before init() is executed
bool | $blEmployMultilanguage New $this->_blEmployMultilanguage value |
Definition at line 84 of file oxi18n.php.
oxI18n.isMultilingualField | ( | $ | sFieldName | ) |
Checks if this field is multlingual (returns false if language = 0)
string | $sFieldName Field name |
Reimplemented in oxArticle.
Definition at line 106 of file oxi18n.php.
oxI18n.isMultilang | ( | ) |
Returns true, if object has multilanguage fields. In oxi18n it is always returns true.
Reimplemented from oxBase.
Definition at line 126 of file oxi18n.php.
oxI18n.loadInLang | ( | $ | iLanguage, | |
$ | sOxid | |||
) |
Loads object data from DB in passed language, returns true on success.
integer | $iLanguage Load this language compatible data | |
string | $sOxid object ID |
Definition at line 139 of file oxi18n.php.
oxI18n.modifyCacheKey | ( | $ | sCacheKey, | |
$ | blOverride = false | |||
) |
Lazy loading cache key modifier.
string | $sCacheKey kache key | |
bool | $blOverride marker to force override cache key |
Reimplemented from oxBase.
Definition at line 154 of file oxi18n.php.
oxI18n.load | ( | $ | sOXID | ) |
Loads object data from DB (object data ID is passed to method). Returns true on success. Object is loaded in current shop language.
string | $sOXID Object ID |
Reimplemented from oxBase.
Reimplemented in oxArticle.
Definition at line 175 of file oxi18n.php.
oxI18n.assign | ( | $ | dbRecord | ) |
Handles multilanguage fields during assignment
array | $dbRecord Associative data values array |
Reimplemented from oxBase.
Reimplemented in oxArticle, oxCategory, oxContent, oxManufacturer, oxNews, oxVendor, and oxWrapping.
Definition at line 188 of file oxi18n.php.
oxI18n.getAvailableInLangs | ( | ) |
Returns an array of languages in which object multilanguage fields are already setted
Definition at line 211 of file oxi18n.php.
oxI18n.getSqlFieldName | ( | $ | sField | ) |
Returns field name depending on object language.
string | $sField Field name |
Reimplemented from oxBase.
Definition at line 272 of file oxi18n.php.
oxI18n.getSqlActiveSnippet | ( | $ | blForceCoreTable = false |
) |
Returns SQL select string with checks if items are available
bool | $blForceCoreTable forces core table usage (optional) |
Reimplemented from oxBase.
Reimplemented in oxArticle, and oxCategory.
Definition at line 289 of file oxi18n.php.
oxI18n._getFieldStatus | ( | $ | sFieldName | ) | [protected] |
Returns _aFieldName[] value. 0 means - non multilanguage, 1 - multilanguage field. This method is slow, so we should make sure it is called only when tmp dir is cleaned (and then the results are cached).
string | $sFieldName Field name |
Reimplemented from oxBase.
Definition at line 321 of file oxi18n.php.
oxI18n._getNonCachedFieldNames | ( | $ | blForceFullStructure = false |
) | [protected] |
Returns the list of fields. This function is slower and its result is normally cached. Basically we have 3 separate cases here: 1. We are in admin so we need extended info for all fields (name, field length and field type) 2. Object is not lazy loaded so we will return all data fields as simple array, as we nede only names 3. Object is lazy loaded so we will return empty array as all fields are loaded on request (in __get()).
bool | $blForceFullStructure Whether to force loading of full data structure |
Reimplemented from oxBase.
Definition at line 341 of file oxi18n.php.
oxI18n._getFieldLang | ( | $ | sFieldName | ) | [protected] |
Gets multilanguage field language. In case of oxtitle_2 it will return 2. 0 is returned if language ending is not defined.
string | $sFieldName Field name |
Definition at line 379 of file oxi18n.php.
oxI18n._update | ( | ) | [protected] |
Update this Object into the database, this function only works on the main table, it will not save any dependend tables, which might be loaded through oxlist.
oxObjectException | Throws on failure inserting |
Reimplemented from oxBase.
Reimplemented in oxArticle, oxCategory, and oxNews.
Definition at line 405 of file oxi18n.php.
oxI18n.$_sClassName = 'oxI18n' [protected] |
Reimplemented from oxBase.
Reimplemented in oxArticle, oxAttribute, oxCategory, oxContent, oxCountry, oxDelivery, oxDeliverySet, oxDiscount, oxLinks, oxManufacturer, oxMediaUrl, oxNews, oxPayment, oxSelectlist, oxShop, oxVendor, and oxWrapping.
Definition at line 17 of file oxi18n.php.
oxI18n.$_iLanguage = null [protected] |
Definition at line 23 of file oxi18n.php.
oxI18n.$_blEmployMultilanguage = true [protected] |
Definition at line 30 of file oxi18n.php.