Skip to content

Commit de1bb92

Browse files
Apply suggestions from code review
Co-authored-by: Estelle Gaits <[email protected]>
1 parent e077b01 commit de1bb92

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/grid/custom_filter.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ class SuppliersStatisticsFilter implements FilterInterface
3434
->setParameter(':stats', $data['stats'])
3535
;
3636

37-
// For driver abstraction you can use the expression builder. ExpressionBuilder is a kind of query builder.
37+
// You can leverage the ExpressionBuilder to apply driver-agnostic filters to the data source.
38+
// Combined with restrict(), it provides query builder–style functionality for grid filters.
3839
// $data['stats'] contains the submitted value!
39-
// here is an example
4040
$dataSource->restrict($dataSource->getExpressionBuilder()->equals('stats', $data['stats']));
4141
}
4242
}
@@ -90,7 +90,7 @@ Create a template for the filter, similar to the existing ones:
9090
```
9191
{% endcode %}
9292

93-
Now you can use your new filter type in the grid configuration!
93+
Your custom filter is now ready to be plugged into the grid configuration using its service alias or FQCN.
9494

9595
{% code title="src/Grid/TournamentGrid.php" lineNumbers="true" %}
9696
```php

0 commit comments

Comments
 (0)