ZMObject
|
+--ZMReviews
public class ZMReviews
extends ZMObject
| Constructor Summary | |
|---|---|
Create new instance. |
|
| Method Summary | |
|---|---|
| ZMReview | createReview(ZMReview review, mixed account, int languageId, ZMAccount author) Create a new review. |
| array | getAllReviews(int languageId) Get all published reviews. |
| float | getAverageRatingForProductId(int productId, int languageId) Get the average rating for the given product id. |
| array | getRandomReviews(int productId, int max, int languageId) Get a random review. |
| int | getReviewCount(int productId, int languageId) Get the number of reviews for the given product (id). |
| ZMReview | getReviewForId(int reviewId, int languageId) Get the review for the given review id. |
| array | getReviewsForProductId(int productId, int languageId) Get all reviews for the given product id. |
| static void | instance() Get instance. |
| void | updateViewCount(int reviewId) Update the view count for the given review id. |
| Methods inherited from org.zenmagick.ZMObject | |
|---|---|
| backtrace, create, log, singleton | |
public ZMReviews()
Create new instance. /
public ZMReview createReview(ZMReview review, mixed account, int languageId, ZMAccount author)
Create a new review.
null.public array getAllReviews(int languageId)
Get all published reviews.
nullZMReview instances.public float getAverageRatingForProductId(int productId, int languageId)
Get the average rating for the given product id.
nullnull if no ratnig exists.public array getRandomReviews(int productId, int max, int languageId)
Get a random review.
null.null to use the setting .nullZMReview instances.public int getReviewCount(int productId, int languageId)
Get the number of reviews for the given product (id).
nullpublic ZMReview getReviewForId(int reviewId, int languageId)
Get the review for the given review id.
nullZMReview instance or null.public array getReviewsForProductId(int productId, int languageId)
Get all reviews for the given product id.
nullZMReview instances.public static void instance()
Get instance. /
public void updateViewCount(int reviewId)
Update the view count for the given review id.
Reviews.