Skip to content

Commit

Permalink
Merge pull request Sylius#8772 from paulstoica/product-reviews-api
Browse files Browse the repository at this point in the history
Product reviews API
  • Loading branch information
pamil authored Jan 5, 2018
2 parents 6527a34 + 17a03ae commit c76dd4c
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions Repository/ProductReviewRepositoryInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

namespace Sylius\Component\Core\Repository;

use Doctrine\ORM\QueryBuilder;
use Sylius\Component\Core\Model\ChannelInterface;
use Sylius\Component\Resource\Repository\RepositoryInterface;
use Sylius\Component\Review\Model\ReviewInterface;
Expand All @@ -35,4 +36,20 @@ public function findLatestByProductId($productId, int $count): array;
* @return array|ReviewInterface[]
*/
public function findAcceptedByProductSlugAndChannel(string $slug, string $locale, ChannelInterface $channel): array;

/**
* @param string $locale
* @param string $productCode
*
* @return QueryBuilder
*/
public function createQueryBuilderByProductCode(string $locale, string $productCode): QueryBuilder;

/**
* @param mixed $id
* @param string $productCode
*
* @return ReviewInterface|null
*/
public function findOneByIdAndProductCode($id, string $productCode): ?ReviewInterface;
}

0 comments on commit c76dd4c

Please sign in to comment.