Public Member Functions | |
__construct () | |
setLanguage ($iLang=null) | |
getLanguage () | |
setEnableMultilang ($blEmployMultilanguage) | |
isMultilingualField ($sFieldName) | |
isMultilang () | |
loadInLang ($iLanguage, $sOxid) | |
modifyCacheKey ($sCacheKey, $blOverride=false) | |
getAvailableInLangs () | |
getUpdateSqlFieldName ($sField) | |
delete ($sOXID=null) | |
Protected Member Functions | |
_getFieldStatus ($sFieldName) | |
_getNonCachedFieldNames ($blForceFullStructure=false) | |
_getFieldLang ($sFieldName) | |
_getUpdateFieldsForTable ($sTable, $blUseSkipSaveFields=true) | |
_getUpdateFields ($blUseSkipSaveFields=true) | |
_update () | |
_getLanguageSetTables ($sCoreTableName=null) | |
_insert () | |
_getObjectViewName ($sTable, $sShopID=null) | |
_getAllFields ($blReturnSimple=false) | |
_addField ($sName, $sStatus, $sType=null, $sLength=null) | |
_canFieldBeNull ($sFieldName) | |
Protected Attributes | |
$_sClassName = 'oxI18n' | |
$_iLanguage = null | |
$_blEmployMultilanguage = true |
Class handling multilanguage data fields
Definition at line 10 of file oxi18n.php.
oxI18n.__construct | ( | ) |
Class constructor, initiates parent constructor (parent.oxBase()).
Reimplemented from oxBase.
Reimplemented in oxActions, oxAttribute, oxCountry, oxDelivery, oxDeliverySet, oxDiscount, oxGroups, oxLinks, oxMediaUrl, oxNews, oxPayment, oxShop, oxState, and oxWrapping.
Definition at line 38 of file oxi18n.php.
oxI18n._addField | ( | $ | sName, | |
$ | sStatus, | |||
$ | sType = null , |
|||
$ | sLength = null | |||
) | [protected] |
Adds additional field to meta structure. Skips language fields
string | $sName Field name | |
string | $sStatus Field status (0-non multilang field, 1-multilang field) | |
string | $sType Field type | |
string | $sLength Field Length |
Reimplemented from oxBase.
Definition at line 539 of file oxi18n.php.
oxI18n._canFieldBeNull | ( | $ | sFieldName | ) | [protected] |
check if db field can be null for multilingual fields it checks only the base fields as they may be coming from outer join views, so oxbase would return that they always support null (while in reality updates to their lang set table with null would fail)
string | $sFieldName db field name |
Reimplemented from oxBase.
Definition at line 559 of file oxi18n.php.
oxI18n._getAllFields | ( | $ | blReturnSimple = false |
) | [protected] |
Returns meta field or simple array of all object fields. This method is slow and normally is called before field cache is built. Make sure it is not called after first page is loaded and cache data is fully built (until tmp dir is cleaned).
bool | $blReturnSimple Set $blReturnSimple to true when you need simple array (meta data array is returned otherwise) |
Reimplemented from oxBase.
Definition at line 515 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 302 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 243 of file oxi18n.php.
oxI18n._getLanguageSetTables | ( | $ | sCoreTableName = null |
) | [protected] |
return all DB tables for the language sets
string | $sCoreTableName core table name [optional] |
Definition at line 458 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 need 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 264 of file oxi18n.php.
oxI18n._getObjectViewName | ( | $ | sTable, | |
$ | sShopID = null | |||
) | [protected] |
Returns actual object view or table name
string | $sTable Original table name | |
int | $sShopID Shop ID |
Reimplemented from oxBase.
Definition at line 495 of file oxi18n.php.
oxI18n._getUpdateFields | ( | $ | blUseSkipSaveFields = true |
) | [protected] |
Get object fields sql part for base table used for updates or inserts: return e.g. fldName1 = 'value1',fldName2 = 'value2'...
bool | $blUseSkipSaveFields forces usage of skip save fields array (default is true) |
Reimplemented from oxBase.
Definition at line 402 of file oxi18n.php.
oxI18n._getUpdateFieldsForTable | ( | $ | sTable, | |
$ | blUseSkipSaveFields = true | |||
) | [protected] |
return update fields SQL part
string | $sTable table name to be updated | |
bool | $blUseSkipSaveFields use skip save fields array? |
Definition at line 339 of file oxi18n.php.
oxI18n._insert | ( | ) | [protected] |
Insert 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.
Reimplemented from oxBase.
Reimplemented in oxNews.
Definition at line 472 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 (with exception of the active language set table, which will be updated).
oxObjectException | Throws on failure inserting |
Reimplemented in oxNews.
Definition at line 417 of file oxi18n.php.
oxI18n.delete | ( | $ | sOXID = null |
) |
Delete this object from the database, returns true on success.
string | $sOXID Object ID(default null) |
Reimplemented from oxBase.
Reimplemented in oxActions, oxAttribute, oxDelivery, oxDeliverySet, oxDiscount, oxGroups, oxMediaUrl, oxNews, and oxPayment.
Definition at line 573 of file oxi18n.php.
oxI18n.getAvailableInLangs | ( | ) |
Returns an array of languages in which object multilanguage fields are already setted
Definition at line 176 of file oxi18n.php.
oxI18n.getLanguage | ( | ) |
Returns object language
Reimplemented from oxBase.
Definition at line 67 of file oxi18n.php.
oxI18n.getUpdateSqlFieldName | ( | $ | sField | ) |
Returns DB field name for update.
string | $sField Field name |
Definition at line 321 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 128 of file oxi18n.php.
oxI18n.isMultilingualField | ( | $ | sFieldName | ) |
Checks if this field is multlingual (returns false if language = 0)
string | $sFieldName Field name |
Definition at line 106 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 141 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 157 of file oxi18n.php.
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 82 of file oxi18n.php.
oxI18n.setLanguage | ( | $ | iLang = null |
) |
Sets object language.
string | $iLang string (default null) |
Definition at line 55 of file oxi18n.php.
oxI18n.$_blEmployMultilanguage = true [protected] |
Reimplemented from oxBase.
Definition at line 33 of file oxi18n.php.
oxI18n.$_iLanguage = null [protected] |
Definition at line 25 of file oxi18n.php.
oxI18n.$_sClassName = 'oxI18n' [protected] |
Reimplemented from oxBase.
Reimplemented in oxActions, oxAttribute, oxCountry, oxDelivery, oxDeliverySet, oxDiscount, oxGroups, oxLinks, oxMediaUrl, oxNews, oxPayment, oxShop, oxState, and oxWrapping.
Definition at line 18 of file oxi18n.php.