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