Article rate manager. Performs loading, updating, inserting of article rates.
◆ __construct()
OxidEsales\EshopCommunity\Application\Model\Rating::__construct |
( |
| ) |
|
Class constructor, initiates parent constructor (parent::oxBase()).
◆ allowRating()
OxidEsales\EshopCommunity\Application\Model\Rating::allowRating |
( |
|
$sUserId, |
|
|
|
$sType, |
|
|
|
$sObjectId |
|
) |
| |
Checks if user can rate product.
- Parameters
-
string | $sUserId | user id |
string | $sType | object type |
string | $sObjectId | object id |
- Returns
- bool
◆ delete()
OxidEsales\EshopCommunity\Application\Model\Rating::delete |
( |
|
$oxid = null | ) |
|
Delete this object from the database, returns true if entry was deleted.
- Parameters
-
string | $oxid | Object ID(default null) |
- Returns
- bool
◆ getObjectId()
OxidEsales\EshopCommunity\Application\Model\Rating::getObjectId |
( |
| ) |
|
Retuns review object id
- Returns
- string
◆ getObjectType()
OxidEsales\EshopCommunity\Application\Model\Rating::getObjectType |
( |
| ) |
|
Retuns review object type
- Returns
- string
◆ getRatingAverage()
OxidEsales\EshopCommunity\Application\Model\Rating::getRatingAverage |
( |
|
$sObjectId, |
|
|
|
$sType, |
|
|
|
$aIncludedObjectsIds = null |
|
) |
| |
calculates and return objects rating
- Parameters
-
string | $sObjectId | object id |
string | $sType | object type |
array | $aIncludedObjectsIds | array of ids |
- Returns
- float
◆ getRatingCount()
OxidEsales\EshopCommunity\Application\Model\Rating::getRatingCount |
( |
|
$sObjectId, |
|
|
|
$sType, |
|
|
|
$aIncludedObjectsIds = null |
|
) |
| |
calculates and return objects rating count
- Parameters
-
string | $sObjectId | object id |
string | $sType | object type |
array | $aIncludedObjectsIds | array of ids |
- Returns
- integer
◆ isProductObjectType()
OxidEsales\EshopCommunity\Application\Model\Rating::isProductObjectType |
( |
| ) |
|
|
private |
Returns true if Rating belongs to Product.
- Returns
- bool
◆ updateProductRating()
OxidEsales\EshopCommunity\Application\Model\Rating::updateProductRating |
( |
| ) |
|
|
private |
◆ $_blDisableShopCheck
OxidEsales\EshopCommunity\Application\Model\Rating::$_blDisableShopCheck = true |
|
protected |
◆ $_sClassName
OxidEsales\EshopCommunity\Application\Model\Rating::$_sClassName = 'oxrating' |
|
protected |
The documentation for this class was generated from the following file: