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