OXID eShop CE
6.2.3
|
Public Member Functions | |
__construct () | |
setLanguage ($lang=null) | |
getLanguage () | |
setEnableMultilang ($employMultilanguage) | |
isMultilingualField ($fieldName) | |
isMultilang () | |
loadInLang ($language, $oxid) | |
modifyCacheKey ($cacheKey, $override=false) | |
getAvailableInLangs () | |
getUpdateSqlFieldName ($field) | |
delete ($oxid=null) | |
Protected Member Functions | |
_getFieldStatus ($fieldName) | |
_getNonCachedFieldNames ($forceFullStructure=false) | |
_getFieldLang ($fieldName) | |
_setUpdateSeoOnFieldChange ($field) | |
_getUpdateFieldsForTable ($table, $useSkipSaveFields=true) | |
checkFieldCanBeUpdated ($fieldName) | |
_getUpdateFields ($useSkipSaveFields=true) | |
_update () | |
_getLanguageSetTables ($coreTableName=null) | |
_insert () | |
_getObjectViewName ($table, $shopID=null) | |
_getAllFields ($returnSimple=false) | |
_addField ($name, $status, $type=null, $length=null) | |
_canFieldBeNull ($fieldName) | |
Protected Attributes | |
$_sClassName = 'oxI18n' | |
$_iLanguage = null | |
$_blEmployMultilanguage = true | |
Class handling multilanguage data fields
OxidEsales\EshopCommunity\Core\Model\MultiLanguageModel::__construct | ( | ) |
Class constructor, initiates parent constructor (parent::oxBase()).
|
protected |
Adds additional field to meta structure. Skips language fields
string | $name | Field name |
string | $status | Field status (0-non multilang field, 1-multilang field) |
string | $type | Field type |
string | $length | Field Length |
|
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 | $fieldName | db field name |
|
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 | $returnSimple | Set $returnSimple to true when you need simple array (meta data array is returned otherwise) |
|
protected |
Gets multilanguage field language. In case of oxtitle_2 it will return 2. 0 is returned if language ending is not defined.
string | $fieldName | Field name |
|
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 | $fieldName | Field name |
|
protected |
Return all DB tables for the language sets
string | $coreTableName | core table name [optional] |
|
protected |
Returns the list of fields. This function is slower and its result is normally cached. Basically we have 3 separate cases here:
bool | $forceFullStructure | Whether to force loading of full data structure |
|
protected |
Returns actual object view or table name
string | $table | Original table name |
int | $shopID | Shop ID |
|
protected |
Get object fields sql part for base table used for updates or inserts: return e.g. fldName1 = 'value1',fldName2 = 'value2'...
bool | $useSkipSaveFields | forces usage of skip save fields array (default is true) |
|
protected |
return update fields SQL part
string | $table | table name to be updated |
bool | $useSkipSaveFields | use skip save fields array? |
|
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.
|
protected |
Checks whether certain field has changed, and sets update seo flag if needed. It can only set the value to false, so it allows for multiple calls to the method, and if atleast one requires seo update, other checks won't override that. Will try to get multilang table name for relevant field check.
string | $field | Field name that will be checked |
|
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 |
|
protected |
If needed, check if field can be updated
string | $fieldName |
OxidEsales\EshopCommunity\Core\Model\MultiLanguageModel::delete | ( | $oxid = null | ) |
Delete this object from the database, returns true on success.
string | $oxid | Object ID(default null) |
OxidEsales\EshopCommunity\Core\Model\MultiLanguageModel::getAvailableInLangs | ( | ) |
Returns an array of languages in which object multilanguage fields are already setted
OxidEsales\EshopCommunity\Core\Model\MultiLanguageModel::getLanguage | ( | ) |
Returns object language
OxidEsales\EshopCommunity\Core\Model\MultiLanguageModel::getUpdateSqlFieldName | ( | $field | ) |
OxidEsales\EshopCommunity\Core\Model\MultiLanguageModel::isMultilang | ( | ) |
Returns true, if object has multilanguage fields. In oxi18n it is always returns true.
OxidEsales\EshopCommunity\Core\Model\MultiLanguageModel::isMultilingualField | ( | $fieldName | ) |
Checks if this field is multlingual (returns false if language = 0)
string | $fieldName | Field name |
OxidEsales\EshopCommunity\Core\Model\MultiLanguageModel::loadInLang | ( | $language, | |
$oxid | |||
) |
Loads object data from DB in passed language, returns true on success.
integer | $language | Load this language compatible data |
string | $oxid | object ID |
OxidEsales\EshopCommunity\Core\Model\MultiLanguageModel::modifyCacheKey | ( | $cacheKey, | |
$override = false |
|||
) |
Lazy loading cache key modifier.
string | $cacheKey | kache key |
bool | $override | marker to force override cache key |
OxidEsales\EshopCommunity\Core\Model\MultiLanguageModel::setEnableMultilang | ( | $employMultilanguage | ) |
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 | $employMultilanguage | New $this->_blEmployMultilanguage value |
OxidEsales\EshopCommunity\Core\Model\MultiLanguageModel::setLanguage | ( | $lang = null | ) |
Sets object language.
string | $lang | string (default null) |
|
protected |
|
protected |
|
protected |