ReviewReadService

Implements \ReviewReadServiceInterface

Class ReviewReadService

category

System

package

Review

subpackage

Services

Methods

ReviewReadService constructor.

__construct(\ReviewAccessRepositoryInterface $repository) 

Arguments

Returns all review entities as array.

getAll() : \ReviewCollection

Returns the average rating by given product id.

getAverageRatingByProductId(\IdType $productId) : double

Arguments

$productId

\IdType

Response

double

Returns review entity data by the given id.

getById(\IdType $id) : \Review

Arguments

$id

\IdType

Response

\Review

Returns the reviews by given customer ID.

getReviewsByCustomerId(\IdType $customerId) : \ReviewCollection

Arguments

$customerId

\IdType

Response

\ReviewCollection

Returns the reviews by given product id.

getReviewsByProductId(\IdType $productId, \IdType $languageId) : \ReviewCollection

Arguments

$productId

\IdType

$languageId

\IdType

Response

\ReviewCollection

Properties

repository

repository : \ReviewAccessRepositoryInterface