OXID eShop CE  4.10.7
 All Classes Namespaces Files Functions Variables Pages
oxERPType Class Reference
+ Inheritance diagram for oxERPType:
+ Collaboration diagram for oxERPType:

Public Member Functions

 getFunctionSuffix ()
 getShopObjectName ()
 getBaseTableName ()
 __construct ()
 setFunctionSuffix ($sNew)
 setFieldList ($aFieldList)
 getTableName ($iShopID=null, $iLanguage=0)
 getSQL ($sWhere, $iLanguage=0, $iShopId=1)
 getSortString ($sFieldName=null, $sType=null)
 checkWriteAccess ($oObj, $aData=null)
 checkCreateAccess ($aData)
 getObjectForDeletion ($sId)
 checkForDeletion ($sId)
 delete ($sID)
 deleteObject ($oObj, $sID)
 addExportData ($aFields)
 addImportData ($aFields)
 getRightFields ()
 getFieldList ()
 getKeyFields ()
 getOxidFromKeyFields ($aData)
 hasKeyFields ()
 saveObject ($aData, $blAllowCustomShopId)

Static Public Attributes

static $ERROR_WRONG_SHOPID = "Wrong shop id, operation not allowed!"

Protected Member Functions

 _getSqlFieldName ($sField, $iLanguage=0, $iShopID=1)
 _isAllowedToEdit ($iShopId)
 _directSqlCheckForDeletion ($sId)
 _preAssignObject ($oShopObject, $aData, $blAllowCustomShopId)
 _preSaveObject ($oShopObject, $aData)
 _postSaveObject ($oShopObject, $aData)

Protected Attributes

 $_sTableName = null
 $_sFunctionSuffix = null
 $_aFieldList = null
 $_aKeyFieldList = null
 $_sShopObjectName = null
 $_blRestrictedByShopId = false
 $_aFieldListVersions = null

Private Member Functions

 _getMultilangualFields ()

Detailed Description

main erp type superclass - includes methods abstraction and basic implementation for all erp object types

Deprecated:
since v5.3.5 (2017-10-02); This class will be completely removed in v6.0. In v6.0 use instead.

Definition at line 9 of file oxerptype.php.

Constructor & Destructor Documentation

Member Function Documentation

oxERPType::_directSqlCheckForDeletion (   $sId)
protected

direct sql check if it is allowed to delete the OXID of the current table

Parameters
string$sIdobject id
Exceptions
Exceptionon no access
Returns
null

Definition at line 320 of file oxerptype.php.

oxERPType::_getMultilangualFields ( )
private

Creates Array with [iLanguage][sFieldName]

Returns
array

Definition at line 114 of file oxerptype.php.

oxERPType::_getSqlFieldName (   $sField,
  $iLanguage = 0,
  $iShopID = 1 
)
protected

return sql column name of given table column

Parameters
string$sFieldfield to get
int$iLanguagelanguage id
int$iShopIDshop id
Returns
string

Reimplemented in oxERPType_OrderArticle.

Definition at line 141 of file oxerptype.php.

oxERPType::_isAllowedToEdit (   $iShopId)
protected

checks if user is allowed to edit in this shop

Parameters
int$iShopIdshop id
Returns
bool

Definition at line 297 of file oxerptype.php.

oxERPType::_postSaveObject (   $oShopObject,
  $aData 
)
protected

post saving hook. can finish transactions if needed or ajust related data

Parameters
oxBase$oShopObjectshop object
data$aDatadata to save
Returns
mixed data to return

Reimplemented in oxERPType_Article.

Definition at line 650 of file oxerptype.php.

oxERPType::_preAssignObject (   $oShopObject,
  $aData,
  $blAllowCustomShopId 
)
protected

issued before saving an object. can modify aData for saving

Parameters
oxBase$oShopObjectshop object
array$aDatadata to prepare
bool$blAllowCustomShopIdif allow custom shop id
Returns
array

Reimplemented in oxERPType_Article, oxERPType_OrderArticle, and oxERPType_Category.

Definition at line 539 of file oxerptype.php.

oxERPType::_preSaveObject (   $oShopObject,
  $aData 
)
protected

prepares object for saving in shop returns true if save can proceed further

Parameters
oxBase$oShopObjectshop object
array$aDatadata for importing
Returns
boolean

Reimplemented in oxERPType_Artextends.

Definition at line 576 of file oxerptype.php.

oxERPType::addExportData (   $aFields)

We have the possibility to add some data

Parameters
array$aFieldsinitial data
Returns
array

Definition at line 403 of file oxerptype.php.

oxERPType::addImportData (   $aFields)

allows to modify data before import

Parameters
array$aFieldsinitial data
See Also
_preAssignObject
Returns
array

Definition at line 417 of file oxerptype.php.

oxERPType::checkCreateAccess (   $aData)

Basic access check for creating new objects

Parameters
array$aDatafields to be written
Exceptions
Exceptionon now access

Definition at line 244 of file oxerptype.php.

oxERPType::checkForDeletion (   $sId)

default check if it is allowed to delete the OXID of the current table

Parameters
string$sIdobject id
Exceptions
Exceptionon no access
Returns
null

Definition at line 344 of file oxerptype.php.

oxERPType::checkWriteAccess (   $oObj,
  $aData = null 
)

Basic access check for writing data, checks for same shopid, should be overridden if field oxshopid does not exist

Parameters
oxBase$oObjloaded shop object
array$aDatafields to be written, null for default
Exceptions
Exceptionon now access
Returns
null

Reimplemented in oxERPType_Article, oxERPType_User, and oxERPType_OrderArticle.

Definition at line 228 of file oxerptype.php.

oxERPType::delete (   $sID)

default deletion of the given OXID in the current table

Parameters
string$sIDobject id
Returns
bool

Definition at line 374 of file oxerptype.php.

oxERPType::deleteObject (   $oObj,
  $sID 
)

default delete call to the given object

Parameters
object$oObjobject
string$sIDobject id
Returns
bool

Definition at line 391 of file oxerptype.php.

oxERPType::getBaseTableName ( )

getter for _sTableName

Returns
string

Definition at line 59 of file oxerptype.php.

oxERPType::getFieldList ( )

returns the predefined field list

Returns
array

Definition at line 446 of file oxerptype.php.

oxERPType::getFunctionSuffix ( )

getter for _sFunctionSuffix

Returns
string

Definition at line 39 of file oxerptype.php.

oxERPType::getKeyFields ( )

returns the keylist array

Returns
array

Definition at line 475 of file oxerptype.php.

oxERPType::getObjectForDeletion (   $sId)

checks done to make sure deletion is possible and allowed

Parameters
string$sIdid of object
Exceptions
Exceptionon error
Returns
object

Definition at line 257 of file oxerptype.php.

oxERPType::getOxidFromKeyFields (   $aData)

returns oxid of this data type from key fields

Parameters
array$aDatadata for object
Returns
string

Definition at line 487 of file oxerptype.php.

oxERPType::getRightFields ( )

used for the RR implementation, right now not really used

Returns
array

Definition at line 427 of file oxerptype.php.

oxERPType::getShopObjectName ( )

getter for _sShopObjectName

Returns
string

Definition at line 49 of file oxerptype.php.

oxERPType::getSortString (   $sFieldName = null,
  $sType = null 
)

returns the "order by " string for a sql query

Parameters
string$sFieldNameorder by that field
string$sTypeallowed values ASC and DESC
Returns
string

Definition at line 203 of file oxerptype.php.

oxERPType::getSQL (   $sWhere,
  $iLanguage = 0,
  $iShopId = 1 
)

returns SQL string for this type

Parameters
string$sWherewhere part of sql
int$iLanguagelanguage id
int$iShopIdshop id
Returns
string

Reimplemented in oxERPType_OrderArticle, and oxERPType_User.

Definition at line 171 of file oxerptype.php.

oxERPType::getTableName (   $iShopID = null,
  $iLanguage = 0 
)

Returns table or View name

Parameters
int$iShopIDshop id - default is the current shop id
int$iLanguagelanguage id
Returns
string

Definition at line 100 of file oxerptype.php.

oxERPType::hasKeyFields ( )

returns try if type has key fields array

Returns
bool

Definition at line 521 of file oxerptype.php.

oxERPType::saveObject (   $aData,
  $blAllowCustomShopId 
)

saves data by calling object saving

Parameters
array$aDatadata for saving
bool$blAllowCustomShopIdallow custom shop id
Returns
string | false

Reimplemented in oxERPType_Artextends.

Definition at line 589 of file oxerptype.php.

oxERPType::setFieldList (   $aFieldList)

setter for field list

Parameters
array$aFieldListfields to set

Definition at line 87 of file oxerptype.php.

oxERPType::setFunctionSuffix (   $sNew)

setter for the function prefix

Parameters
string$sNewnew suffix

Definition at line 77 of file oxerptype.php.

Member Data Documentation

oxERPType::$_aFieldList = null
protected

Definition at line 16 of file oxerptype.php.

oxERPType::$_aFieldListVersions = null
protected

Definition at line 32 of file oxerptype.php.

oxERPType::$_aKeyFieldList = null
protected

Definition at line 17 of file oxerptype.php.

oxERPType::$_blRestrictedByShopId = false
protected

Definition at line 25 of file oxerptype.php.

oxERPType::$_sFunctionSuffix = null
protected

Definition at line 15 of file oxerptype.php.

oxERPType::$_sShopObjectName = null
protected

Definition at line 18 of file oxerptype.php.

oxERPType::$_sTableName = null
protected

Definition at line 14 of file oxerptype.php.

oxERPType::$ERROR_WRONG_SHOPID = "Wrong shop id, operation not allowed!"
static

Definition at line 12 of file oxerptype.php.


The documentation for this class was generated from the following file: