Public Member Functions | |
getFields ($sTableName) | |
tableExists ($sTableName) | |
fieldExists ($sFieldName, $sTableName) | |
getAllTables () | |
getAllMultiTables ($sTable) | |
getCurrentMaxLangId () | |
getNextLangId () | |
getMultilangFields ($sTable) | |
getSinglelangFields ($sTable, $iLang) | |
addNewMultilangField ($sTable) | |
resetMultilangFields ($iLangId, $sTableName) | |
addNewLangToDb () | |
resetLanguage ($iLangId) | |
updateViews () | |
Protected Member Functions | |
_getCreateTableSetSql ($sTable, $iLang) | |
_getAddFieldSql ($sTable, $sField, $iLang) | |
_getAddFieldIndexSql ($sTable, $sField, $iLang) | |
_executeSql ($aSql) | |
Protected Attributes | |
$_aDbTablesFields = null | |
$_aTables = null | |
$_iCurrentMaxLangId | |
$_aSkipTablesOnReset = array( "oxcountry" ) |
Class for handling database related operations
Definition at line 7 of file oxdbmetadatahandler.php.
oxDbMetaDataHandler._executeSql | ( | $ | aSql | ) | [protected] |
Executes arrary of sql strings
array | $aSql SQL query array |
Definition at line 440 of file oxdbmetadatahandler.php.
oxDbMetaDataHandler._getAddFieldIndexSql | ( | $ | sTable, | |
$ | sField, | |||
$ | iLang | |||
) | [protected] |
Get sql for new multilang field index creation
string | $sTable core table name | |
string | $sField field name | |
string | $iLang new language id |
Definition at line 199 of file oxdbmetadatahandler.php.
oxDbMetaDataHandler._getAddFieldSql | ( | $ | sTable, | |
$ | sField, | |||
$ | iLang | |||
) | [protected] |
Get sql for new multilang field creation
string | $sTable core table name | |
string | $sField field name | |
string | $iLang new language id |
Definition at line 159 of file oxdbmetadatahandler.php.
oxDbMetaDataHandler._getCreateTableSetSql | ( | $ | sTable, | |
$ | iLang | |||
) | [protected] |
Get sql for new multilanguage table set creation
string | $sTable core table name | |
string | $iLang language id |
Definition at line 138 of file oxdbmetadatahandler.php.
oxDbMetaDataHandler.addNewLangToDb | ( | ) |
Add new language to database. Scans all tables and adds new multilanguage fields
Definition at line 389 of file oxdbmetadatahandler.php.
oxDbMetaDataHandler.addNewMultilangField | ( | $ | sTable | ) |
Add new multilanguages fields to table. Dublicates all multilanguage fields and fields indexes with next available language ID
string | $sTable table name |
Definition at line 319 of file oxdbmetadatahandler.php.
oxDbMetaDataHandler.fieldExists | ( | $ | sFieldName, | |
$ | sTableName | |||
) |
Check if field exists in table
string | $sFieldName field name | |
string | $sTableName table name |
Definition at line 74 of file oxdbmetadatahandler.php.
oxDbMetaDataHandler.getAllMultiTables | ( | $ | sTable | ) |
return all DB tables for the language sets
string | $sTable table name to check |
Definition at line 117 of file oxdbmetadatahandler.php.
oxDbMetaDataHandler.getAllTables | ( | ) |
Get all tables names from db. Views tables are not incuded in this list.
Definition at line 95 of file oxdbmetadatahandler.php.
oxDbMetaDataHandler.getCurrentMaxLangId | ( | ) |
Get max language ID used in shop. For checking is used table "oxarticle" field "oxtitle"
Definition at line 235 of file oxdbmetadatahandler.php.
oxDbMetaDataHandler.getFields | ( | $ | sTableName | ) |
Get table fields
string | $sTableName table name |
Definition at line 41 of file oxdbmetadatahandler.php.
oxDbMetaDataHandler.getMultilangFields | ( | $ | sTable | ) |
Get table multilanguge fields
string | $sTable table name |
Definition at line 271 of file oxdbmetadatahandler.php.
oxDbMetaDataHandler.getNextLangId | ( | ) |
oxDbMetaDataHandler.getSinglelangFields | ( | $ | sTable, | |
$ | iLang | |||
) |
Get single language fields
string | $sTable table name | |
int | $iLang languane id |
Definition at line 293 of file oxdbmetadatahandler.php.
oxDbMetaDataHandler.resetLanguage | ( | $ | iLangId | ) |
Reseting all multilanguage fields with specific language id to default value in all tables. Only if language ID > 0.
int | $iLangId Language id |
Definition at line 412 of file oxdbmetadatahandler.php.
oxDbMetaDataHandler.resetMultilangFields | ( | $ | iLangId, | |
$ | sTableName | |||
) |
Reseting all multilanguage fields with specific language id to default value in selected table
int | $iLangId Language id | |
string | $sTableName Table name |
Definition at line 356 of file oxdbmetadatahandler.php.
oxDbMetaDataHandler.tableExists | ( | $ | sTableName | ) |
Check if table exists
string | $sTableName table name |
Definition at line 60 of file oxdbmetadatahandler.php.
oxDbMetaDataHandler.updateViews | ( | ) |
oxDbMetaDataHandler.$_aDbTablesFields = null [protected] |
Definition at line 13 of file oxdbmetadatahandler.php.
oxDbMetaDataHandler.$_aSkipTablesOnReset = array( "oxcountry" ) [protected] |
Definition at line 32 of file oxdbmetadatahandler.php.
oxDbMetaDataHandler.$_aTables = null [protected] |
Definition at line 20 of file oxdbmetadatahandler.php.
oxDbMetaDataHandler.$_iCurrentMaxLangId [protected] |
Definition at line 26 of file oxdbmetadatahandler.php.