@@ -91,7 +91,7 @@ As others filters, the date filter must be explicitly enabled:
91
91
# app/config/services.yml
92
92
93
93
services:
94
- # Enable date filter for for the property "dateProperty" of the resource "resource.offer"
94
+ # Enable date filter for the property "dateProperty" of the resource "resource.offer"
95
95
resource.date_filter:
96
96
parent: "api.doctrine.orm.date_filter"
97
97
arguments: [ { "dateProperty": ~ } ]
@@ -110,12 +110,12 @@ services:
110
110
The date filter is able to deal with date properties having `null` values.
111
111
Four behaviors are available at the property level of the filter :
112
112
113
- | Description | Strategy to set |
114
- |--------------------------------------|-------------------------------------------------------------------------------|
115
- | Use the default behavior of the DBMS | `null` |
116
- | Exclude items | `Dunglas\ApiBundle\Doctrine\Orm\Filter\DateFilter::EXCLUDE_NULL` (`0`) |
117
- | Consider items as oldest | `Dunglas\ApiBundle\Doctrine\Orm\Filter\DateFilter::INCLUDE_NULL_BEFORE` (`1 `) |
118
- | Consider items as youngest | `Dunglas\ApiBundle\Doctrine\Orm\Filter\DateFilter::INCLUDE_NULL_AFTER` (`2`) |
113
+ | Description | Strategy to set |
114
+ |--------------------------------------|------------------------------------------------------------------------------------------------- |
115
+ | Use the default behavior of the DBMS | `null` |
116
+ | Exclude items | `Dunglas\ApiBundle\Doctrine\Orm\Filter\DateFilter::EXCLUDE_NULL` (`exclude_null`) |
117
+ | Consider items as oldest | `Dunglas\ApiBundle\Doctrine\Orm\Filter\DateFilter::INCLUDE_NULL_BEFORE` (`include_null_before `) |
118
+ | Consider items as youngest | `Dunglas\ApiBundle\Doctrine\Orm\Filter\DateFilter::INCLUDE_NULL_AFTER` (`include_null_after`) |
119
119
120
120
For instance, exclude entries with a property value of `null`, with the following service definition :
121
121
@@ -126,7 +126,7 @@ For instance, exclude entries with a property value of `null`, with the followin
126
126
services:
127
127
resource.date_filter:
128
128
parent: "api.doctrine.orm.date_filter"
129
- arguments: [ { "dateProperty": ~ } ]
129
+ arguments: [ { "dateProperty": exclude_null } ]
130
130
131
131
resource.offer:
132
132
parent: "api.resource"
0 commit comments