|
- <?php
-
- namespace Lc\SovBundle\Repository\Site;
-
- use Knp\Component\Pager\PaginatorInterface;
- use Lc\SovBundle\Repository\AbstractRepositoryQuery;
-
- class PageRepositoryQuery extends AbstractRepositoryQuery implements PageRepositoryQueryInterface
- {
- public function __construct(PageRepository $repository, PaginatorInterface $paginator)
- {
- parent::__construct($repository, 'r', $paginator);
- }
-
- public function filterBySlug(string $slug)
- {
- return $this
- ->andWhere('.slug = :slug')
- ->setParameter('slug', $slug);
- }
- }
|