ZMObject
└─ZMReviews
public class ZMReviews
extends ZMObject
| Fields inherited from org.zenmagick.core\ZMObject | |
|---|---|
| properties_ | |
| Method Summary | |
|---|---|
| void | Create new instance. |
| 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 languageId, int productId, int max) 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.core\ZMObject | |
|---|---|
| __construct, attachMethod, get, getAttachedMethods, getProperties, getPropertyNames, set, singleton | |
public void __construct()
Create new instance.
public ZMReview createReview(ZMReview review, mixed account, int languageId, ZMAccount author)
Create a new review.
public array getAllReviews(int languageId)
Get all published reviews.
ZMReview instances.public float getAverageRatingForProductId(int productId, int languageId)
Get the average rating for the given product id.
null if no ratnig exists.public array getRandomReviews(int languageId, int productId, int max)
Get a random review.
null.null to use the setting .ZMReview instances.public int getReviewCount(int productId, int languageId)
Get the number of reviews for the given product (id).
public ZMReview getReviewForId(int reviewId, int languageId)
Get the review for the given review id.
ZMReview instance or null.public array getReviewsForProductId(int productId, int languageId)
Get all reviews for the given product id.
ZMReview instances.public static void instance()
Get instance.
public void updateViewCount(int reviewId)
Update the view count for the given review id.
Reviews.