|
123456789101112131415161718192021222324252627 |
- <?php
-
- namespace Lc\SovBundle\Repository\Site;
-
- use Lc\SovBundle\Model\Site\PageInterface;
- use Lc\SovBundle\Repository\AbstractStore;
-
- class PageStore extends AbstractStore implements PageStoreInterface
- {
- protected PageRepositoryQueryInterface $query;
-
- public function __construct(PageRepositoryQueryInterface $query)
- {
- $this->query = $query;
- }
-
- //findPageBySlug
- public function getBySlug(string $slug): ?PageInterface
- {
- $query = $this->query->create();
-
- $query
- ->filterBySlug($slug);
-
- return $query->findOne();
- }
- }
|