suivi/src/Repository/InterventionRepositoryQuery.php
2022-03-06 21:14:36 +01:00

26 lines
671 B
PHP

<?php
namespace App\Repository;
use App\Core\Repository\RepositoryQuery;
use App\Repository\InterventionRepository as Repository;
use Knp\Component\Pager\PaginatorInterface;
class InterventionRepositoryQuery extends RepositoryQuery
{
public function __construct(Repository $repository, PaginatorInterface $paginator)
{
parent::__construct($repository, 'i', $paginator);
}
protected function filterHandler(string $name, $value)
{
if ('establishment' === $name) {
$this
->andWhere('.establishment = :establishment')
->setParameter(':establishment', $value)
;
}
}
}