|
- <?php
-
- namespace Lc\CaracoleBundle\Repository\Site;
-
- use Lc\CaracoleBundle\Repository\MerchantStoreTrait;
- use Lc\SovBundle\Repository\Site\NewsStore as SovNewsStore;
-
- class NewsStore extends SovNewsStore
- {
- use MerchantStoreTrait;
-
- public function getLatests(int $maxResults = 0, $query = null): array
- {
- if (is_null($query)) {
- $query = $this->query->create();
- }
-
- if ($this->merchant) {
- $query->filterByMerchant($this->merchant);
- }
-
- return parent::getLatests($maxResults, $query);
- }
-
- }
|