GetLastReviewsExtension
class GetLastReviewsExtension extends Twig_Extension
Class GetLastReviewsExtension is injected as twig.extension.alligator.last_reviews service. GetLastReviewsExtension handles the logic and provides necessary data for managed entity in twig.
Constants
| LAST_REVIEWS_CACHE |
|
Properties
| protected ReviewManager | $reviewManager | ||
| protected string | $sidebarReviewsHtml |
Methods
getFunctions()
{@inheritdoc}
array
getLastReviews(int $number, bool $approved = false)
Find provided number of reviews
array
getLastTickets(int $number, bool $approved = false)
Find all tickets
array
getProductReviewsSummary(Product $product)
Retrieve number of ratings and average average rating for provided product
string
getLastReviewsCache(string $theme)
Retrieve sidebar reviews from cache
string
getName()
Returns the name of the extension.
Details
at line 41
__construct(ReviewManager $reviewManager)
GetLastReviewsExtension constructor.
at line 49
getFunctions()
{@inheritdoc}
at line 67
array
getLastReviews(int $number, bool $approved = false)
Find provided number of reviews
at line 80
array
getLastTickets(int $number, bool $approved = false)
Find all tickets
at line 95
array
getProductReviewsSummary(Product $product)
Retrieve number of ratings and average average rating for provided product
at line 109
string
getLastReviewsCache(string $theme)
Retrieve sidebar reviews from cache
at line 123
string
getName()
Returns the name of the extension.