suivi/src/Repository/BillRepositoryQuery.php
2023-04-08 17:47:43 +02:00

26 lines
642 B
PHP

<?php
namespace App\Repository;
use App\Core\Repository\RepositoryQuery;
use App\Repository\BillRepository as Repository;
use Knp\Component\Pager\PaginatorInterface;
class BillRepositoryQuery extends RepositoryQuery
{
public function __construct(Repository $repository, PaginatorInterface $paginator)
{
parent::__construct($repository, 'b', $paginator);
}
protected function filterHandler(string $name, $value)
{
if ('vendor' === $name && null !== $value) {
$this
->where('.vendor = :vendor')
->setParameter('vendor', $value)
;
}
}
}