2021-03-24 19:10:26 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Core\Repository\Site;
|
|
|
|
|
|
|
|
use App\Core\Repository\RepositoryQuery;
|
|
|
|
use Knp\Component\Pager\PaginatorInterface;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* class NavigationRepositoryQuery.
|
|
|
|
*
|
|
|
|
* @author Simon Vieille <simon@deblan.fr>
|
|
|
|
*/
|
|
|
|
class NavigationRepositoryQuery extends RepositoryQuery
|
|
|
|
{
|
|
|
|
public function __construct(NavigationRepository $repository, PaginatorInterface $paginator)
|
|
|
|
{
|
|
|
|
parent::__construct($repository, 'n', $paginator);
|
|
|
|
}
|
|
|
|
|
2021-04-30 12:20:42 +02:00
|
|
|
public function filterById($id)
|
|
|
|
{
|
|
|
|
$this
|
|
|
|
->where('.id = :id')
|
|
|
|
->setParameter(':id', $id)
|
|
|
|
;
|
|
|
|
|
|
|
|
return $this;
|
|
|
|
}
|
|
|
|
|
2021-03-24 19:10:26 +01:00
|
|
|
public function whereDomain($domain)
|
|
|
|
{
|
|
|
|
return $this
|
|
|
|
->andWhere('.domain = :domain')
|
|
|
|
->setParameter(':domain', $domain)
|
|
|
|
;
|
|
|
|
}
|
|
|
|
}
|