Skip to content

Commit e1c4e95

Browse files
committed
Some more fixes
1 parent e2f0806 commit e1c4e95

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

core/filters.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
# Filters
22

33
API Platform Core provides a generic system to apply filters on collections. Useful filters for the Doctrine ORM are provided
4-
with the bundle. However the filter system is extensible enough to let you create custom filters that would fit your specific
5-
needs and for any data provider.
4+
with the library. You can also create custom filters that would fit your specific needs.
5+
You can also add filtering support to your custom [data providers](data-providers.md) by implementing interfaces provided
6+
by the library.
67

78
By default, all filters are disabled. They must be enabled explicitly.
89

9-
When a filter is enabled, it is automatically documented as a `hydra:search` property in the collection response. It also automatically
10-
appears in the [NelmioApiDoc documentation](nelmio-api-doc.md) if it is available.
10+
When a filter is enabled, it is automatically documented as a `hydra:search` property in the collection response. It also
11+
automatically appears in the [NelmioApiDoc documentation](nelmio-api-doc.md) if it is available.
1112

1213
## Search filter
1314

1415
If Doctrine ORM support is enabled, adding filters is as easy as registering a filter service in your `app/config/services.yml`
15-
file and adding an attribute to your resourcegi configuration.
16+
file and adding an attribute to your resource configuration.
1617

1718
The search filter supports `exact`, `partial`, `start`, `end`, and `word_start` matching strategies:
1819

@@ -231,7 +232,7 @@ class Offer
231232

232233
Given that the collection endpoint is `/offers`, you can filter offers by boolean with the following query: `/offers?isAvailableGenericallyInMyCountry=true`.
233234

234-
It will return all offers with `isAvailableGenericallyInMyCountry` equals `true`.
235+
It will return all offers where `isAvailableGenericallyInMyCountry` equals `true`.
235236

236237
## Numeric Filter
237238

@@ -309,9 +310,9 @@ or order offers by the product's release date: `http://localhost:8000/api/offers
309310

310311
## Enabling a filter for all properties of a resource
311312

312-
As we have seen in previous examples, properties where filters can be applied must be explicitly declared. But if you don't
313-
care about security and performance (e.g. an API with restricted access), it is also possible to enable built-in filters for
314-
all properties:
313+
As we have seen in previous examples, properties where filters can be applied must be explicitly declared. If you don't
314+
care about security and performance (e.g. an API with restricted access), it is also possible to enable built-in filters
315+
for all properties:
315316

316317
```yaml
317318
# app/config/services.yml

0 commit comments

Comments
 (0)