You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
574B

  1. <?php
  2. namespace Lc\SovBundle\Repository\Site;
  3. use Knp\Component\Pager\PaginatorInterface;
  4. use Lc\SovBundle\Repository\AbstractRepositoryQuery;
  5. class PageRepositoryQuery extends AbstractRepositoryQuery implements PageRepositoryQueryInterface
  6. {
  7. public function __construct(PageRepository $repository, PaginatorInterface $paginator)
  8. {
  9. parent::__construct($repository, 'r', $paginator);
  10. }
  11. public function filterBySlug(string $slug)
  12. {
  13. return $this
  14. ->andWhere('.slug = :slug')
  15. ->setParameter('slug', $slug);
  16. }
  17. }