26 lines
671 B
PHP
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)
|
|
;
|
|
}
|
|
}
|
|
}
|