You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 line
564B

  1. <?php
  2. namespace Lc\CaracoleBundle\Repository\Site;
  3. use Lc\CaracoleBundle\Repository\MerchantStoreTrait;
  4. use Lc\SovBundle\Repository\Site\NewsStore as SovNewsStore;
  5. class NewsStore extends SovNewsStore
  6. {
  7. use MerchantStoreTrait;
  8. public function getLatests(int $maxResults = 0, $query = null): array
  9. {
  10. if (is_null($query)) {
  11. $query = $this->query->create();
  12. }
  13. if ($this->merchant) {
  14. $query->filterByMerchant($this->merchant);
  15. }
  16. return parent::getLatests($maxResults, $query);
  17. }
  18. }