ReviewManager
class ReviewManager implements ReviewManagerInterface, BasicEntityManagerInterface, JQGridInterface
Class ReviewManager is injected as alligator.review_manager service. ReviewManager handles the logic for managed entity.
Traits
Constants
| EMAIL_TEMPLATE |
|
Properties
| protected ReviewRepository | $repository | ||
| protected ReviewEventContainer | $eventContainer |
Methods
No description
No description
No description
ReviewManager constructor.
Find id, review content and approved status for review that match provided id
Update product rating and dispatch event to update rating on product
Send mails to user and admins
Remove reviews from provided array of reviews
Find all reviews for product that match provided slug
Find all reviews that match provided criteria
Find provided number of reviews
Retrieve sidebar reviews from cache
Set sidebar reviews to cache
Retrieve cached sidebar reviews
Set cached sidebar reviews
Dispatch event to re-cache sidebar reviews
Find all tickets
Retrieve number of ratings and average average rating for provided product
Update rating for product in provided brand
Details
in JQGridManagerTrait at line 26
mixed
searchForJQGRID(array $searchParams, array $sortParams = array(), array $additionalParams = array(), JQGridWrapper $jqGridWrapper = null)
in JQGridManagerTrait at line 40
mixed
findAllForJQGRID(int $page, int $offset, array $sortParams, array $additionalParams = array(), JQGridWrapper $jqGridWrapper = null)
in JQGridManagerTrait at line 53
mixed
getCountForJQGRID(array|null $searchParams = null, array|null $sortParams = null, array|null $additionalParams = array(), JQGridWrapper|null $jqGridWrapper = null)
at line 52
__construct(ReviewRepository $repository, ReviewEventContainer $eventContainer)
ReviewManager constructor.
at line 65
array
getReviewWithSelectById(int $reviewId)
Find id, review content and approved status for review that match provided id
at line 77
Review
saveReview(Review $review)
Persist new review, and send mail to all admins and review author
at line 95
updateProductRatingsForReview(Review $review)
Update product rating and dispatch event to update rating on product
at line 142
sendMails()
Send mails to user and admins
at line 166
bool
deleteReviews(array $array)
Remove reviews from provided array of reviews
at line 213
array
findReviewsByProductSlug(string $slug, int $page, bool $isCountSearch = false)
Find all reviews for product that match provided slug
at line 229
mixed
searchReviewsForProductEditBackend(int $productId, int $page, int|null $userId = null, DateTime $dateFrom = null, DateTime $dateTo = null)
Find all reviews that match provided criteria
at line 242
array
getReviewsForDashboard(int $number, bool $approved)
Find provided number of reviews
at line 265
mixed
getSidebarReviewsHtml(string $theme)
Retrieve sidebar reviews from cache
at line 286
mixed
generateSidebarReviewsHtml(string $theme)
Set sidebar reviews to cache
at line 314
string
getSidebarReviewsHtmlFromCache()
Retrieve cached sidebar reviews
at line 324
setSidebarHtmlToCache(String $sidebarReviewsHtml)
Set cached sidebar reviews
at line 334
dispatchReviewEditEvent(String $theme)
Dispatch event to re-cache sidebar reviews
at line 344
array
getTicketsForAdmin()
Find all tickets
at line 358
array
getReviewTotalForProduct(Product $product)
Retrieve number of ratings and average average rating for provided product
at line 371
bool
updateMultipleProductsRatings(float $newRating, array $brandsArray)
Update rating for product in provided brand