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

Public Member Functions

 __construct ()
 allowRating ($sUserId, $sType, $sObjectId)
 getRatingAverage ($sObjectId, $sType, $aIncludedObjectsIds=null)
 getRatingCount ($sObjectId, $sType, $aIncludedObjectsIds=null)
 getObjectType ()
 getObjectId ()
- Public Member Functions inherited from oxBase
 getUseSkipSaveFields ()
 setUseSkipSaveFields ($blUseSkipSaveFields)
 __set ($sName, $sValue)
 __get ($sName)
 __isset ($mVar)
 __clone ()
 oxClone ($oObject)
 getUpdateSeo ()
 setUpdateSeo ($blUpdateSeo)
 init ($sTableName=null, $blForceAllFields=false)
 assign ($dbRecord)
 getClassName ()
 getCoreTableName ()
 getId ()
 setId ($sOXID=null)
 setShopId ($iShopId)
 getShopId ()
 getViewName ($blForceCoreTableUsage=null)
 modifyCacheKey ($sCacheKey, $blOverride=false)
 disableLazyLoading ()
 isDerived ()
 setIsDerived ($blVal)
 isMultilang ()
 load ($sOXID)
 isLoaded ()
 buildSelectString ($aWhere=null)
 assignRecord ($sSelect)
 getFieldData ($sFieldName)
 getSelectFields ($blForceCoreTableUsage=null)
 delete ($sOxId=null)
 save ()
 allowDerivedUpdate ()
 allowDerivedDelete ()
 exists ($sOXID=null)
 getSqlActiveSnippet ($blForceCoreTable=null)
 beforeUpdate ($sOXID=null)
 onChange ($iAction=null, $sOXID=null)
 setInList ()
 isOx ()
 isReadOnly ()
 setReadOnly ($blReadOnly)
 getFieldNames ()
 addFieldName ($sName)
 getLanguage ()
- Public Member Functions inherited from oxSuperCfg
 __call ($sMethod, $aArgs)
 getConfig ()
 setConfig ($oConfig)
 getSession ()
 setSession ($oSession)
 getUser ()
 setUser ($oUser)
 isAdmin ()
 setAdminMode ($blAdmin)

Protected Attributes

 $_blDisableShopCheck = true
 $_sClassName = 'oxrating'
- Protected Attributes inherited from oxBase
 $_sOXID = null
 $_iShopId = null
 $_blIsSimplyClonable = true
 $_sClassName = 'oxbase'
 $_sCoreTable = null
 $_sViewTable = null
 $_aFieldNames = array('oxid' => 0)
 $_sCacheKey = null
 $_blUseLazyLoading = false
 $_aSkipSaveFields = array('oxtimestamp')
 $_blUseSkipSaveFields = true
 $_sExistKey = 'oxid'
 $_blIsDerived = null
 $_blIsSeoObject = false
 $_blUpdateSeo = true
 $_blReadOnly = false
 $_blIsInList = false
 $_isLoaded = false
 $_aInnerLazyCache = null
 $_blEmployMultilanguage = false

Additional Inherited Members

- Protected Member Functions inherited from oxBase
 _setUpdateSeoOnFieldChange ($sField)
 _removeElement2ShopRelations ($sOxId)
 _isInList ()
 _getObjectViewName ($sTable, $sShopID=null)
 _getTableFields ($sTable, $blReturnSimple=false)
 _getAllFields ($blReturnSimple=false)
 _initDataStructure ($blForceFullStructure=false)
 _getNonCachedFieldNames ($blForceFullStructure=false)
 _getFieldStatus ($sFieldName)
 _addField ($sName, $iStatus, $sType=null, $sLength=null)
 _getFieldLongName ($sFieldName)
 _setFieldData ($sFieldName, $sValue, $iDataType=oxField::T_TEXT)
 _canFieldBeNull ($sFieldName)
 _getFieldDefaultValue ($sFieldName)
 _getUpdateFieldValue ($sFieldName, $oField)
 _getUpdateFields ($blUseSkipSaveFields=true)
 _update ()
 _insert ()
 _isDisabledFieldCache ()
 _addSkippedSaveFieldsForMapping ()
 _disableLazyLoadingForCaching ()
- Static Protected Attributes inherited from oxBase
static $_blDisableFieldCaching = array()

Detailed Description

Article rate manager. Performs loading, updating, inserting of article rates.

Definition at line 8 of file oxrating.php.

Constructor & Destructor Documentation

oxRating::__construct ( )

Class constructor, initiates parent constructor (parent::oxBase()).

Reimplemented from oxBase.

Definition at line 28 of file oxrating.php.

Member Function Documentation

oxRating::allowRating (   $sUserId,
  $sType,
  $sObjectId 
)

Checks if user can rate product.

Parameters
string$sUserIduser id
string$sTypeobject type
string$sObjectIdobject id
Returns
bool

Definition at line 43 of file oxrating.php.

oxRating::getObjectId ( )

Retuns review object id

Returns
string

Definition at line 148 of file oxrating.php.

oxRating::getObjectType ( )

Retuns review object type

Returns
string

Definition at line 138 of file oxrating.php.

oxRating::getRatingAverage (   $sObjectId,
  $sType,
  $aIncludedObjectsIds = null 
)

calculates and return objects rating

Parameters
string$sObjectIdobject id
string$sTypeobject type
array$aIncludedObjectsIdsarray of ids
Returns
float

Definition at line 70 of file oxrating.php.

oxRating::getRatingCount (   $sObjectId,
  $sType,
  $aIncludedObjectsIds = null 
)

calculates and return objects rating count

Parameters
string$sObjectIdobject id
string$sTypeobject type
array$aIncludedObjectsIdsarray of ids
Returns
integer

Definition at line 107 of file oxrating.php.

Member Data Documentation

oxRating::$_blDisableShopCheck = true
protected

Definition at line 16 of file oxrating.php.

oxRating::$_sClassName = 'oxrating'
protected

Definition at line 23 of file oxrating.php.


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