|
- <?php
-
- namespace Lc\CaracoleBundle\Repository\Site;
-
- use Lc\CaracoleBundle\Model\Section\SectionInterface;
- use Lc\CaracoleBundle\Repository\SectionStoreTrait;
- use Lc\SovBundle\Model\Site\PageInterface;
- use Lc\SovBundle\Repository\Site\PageStore as SovPageStore;
-
- class PageStore extends SovPageStore
- {
- use SectionStoreTrait;
-
- public function __construct(PageRepositoryQuery $query)
- {
- parent::__construct($query);
- }
-
-
-
- public function getOnePage(string $devAlias, SectionInterface $section = null): ?PageInterface
- {
- $query = $this->query->create();
-
- if ($section == null) {
- $section = $this->section;
- }
- $query
- ->filterIsOnline()
- ->filterByDevAlias($devAlias)
- ->filterBySection($section);
-
- return $query->findOne();
- }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- }
|