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.

NewsStore.php 564B

3 years ago
12345678910111213141516171819202122232425
  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. }