add doc about filterHandler
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Simon Vieille 2023-10-11 23:08:48 +02:00
parent c2bcee306d
commit 7c180c3bbb
Signed by: deblan
GPG key ID: 579388D585F70417

View file

@ -141,6 +141,32 @@ class MyEntityRepositoryQuery extends RepositoryQuery
}
```
You can also force `filterHandler` te be used for specific filter field:
```php-inline
// ...
class MyEntityRepositoryQuery extends RepositoryQuery
{
public function __construct(Repository $repository, PaginatorInterface $paginator)
{
// ...
$this->addForcedFilterHandler('foo');
}
public function filterHandler(string $name, $value): self
{
// ...
if ($name === 'foo) {
// ...
}
}
}
```
## Pager