ReviewRepository
class ReviewRepository extends EntityRepository
Class ReviewRepository is injected as alligator.review_repository service. ReviewRepository is used for crud operation for entity.
Use this class to work with database.
Traits
Constants
| ALIAS |
Alias for entity |
| AUTHOR_ALIAS |
Alias for user entity |
| IMAGE_ALIAS |
Alias for image entity |
| REVIEW_OFFSET |
Indicates how much comments should be fetched when queried from frontend |
Methods
Should contain group by which jqgrid uses.
JQGrid function
JQGrid function
Find id, review content and approved status for review that match provided id
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
Find all reviews that match provided ids
Find latest approved reviews for provided product and user
Details
in JQGridTrait at line 27
jQGridJoinFields(QueryBuilder $qb, JQGridWrapper $jqGridWrapper)
All joins used in select.
Override in the repository class if needed. Should do nothing otherwise
in JQGridTrait at line 42
jQGridGroupByFields(QueryBuilder $qb, JQGridWrapper $jqGridWrapper)
Should contain group by which jqgrid uses.
Override in the repository class if needed. Should do nothing otherwise
in JQGridTrait at line 61
array
findAllForJQGRID(int $page, int $offset, array $sortParams, array $additionalParams, JQGridWrapper $jqGridWrapper)
JQGrid function
in JQGridTrait at line 94
array
searchForJQGRID(array $searchParams, array $sortParams, bool $isCountSearch = false, array $additionalParams = array(), JQGridWrapper $jqGridWrapper = null)
JQGrid function
at line 72
array
getReviewWithSelectById(int $reviewId)
Find id, review content and approved status for review that match provided id
at line 110
bool
deleteReviews(array $arrayOfReviews)
Remove reviews from provided array of reviews
at line 136
array
findReviewsByProductSlug(string $lug, integer $page, boolean $isCountSearch = false)
Find all reviews for product that match provided slug
at line 184
array
searchReviewsForProductEditBackend(int $productId, int $page, int|null $userId = null, DateTime $dateFrom = null, DateTime $dateTo = null)
Find all reviews that match provided criteria
at line 255
array
getReviewsForDashboard(int $number, bool $approved)
Find provided number of reviews
at line 292
array
getReviewsObjectFromArray(array $array)
Find all reviews that match provided ids
at line 309
array
getLatestApprovedReview(int $productId, int $userId)
Find latest approved reviews for provided product and user