Skip to content

Commit 34131e5

Browse files
committed
docs
1 parent 844e91e commit 34131e5

File tree

1 file changed

+0
-64
lines changed

1 file changed

+0
-64
lines changed

docs/getting-elements/event-queries.md

Lines changed: 0 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -51,38 +51,6 @@ Event queries support the following parameters:
5151

5252
<!-- BEGIN PARAMS -->
5353

54-
### `after`
55-
Narrows the query results to only events that were posted on or after a certain date.
56-
57-
Possible values include:
58-
59-
| Value | Fetches events…
60-
| - | -
61-
| `'2018-04-01'` | that were posted after 2018-04-01.
62-
| a [DateTime](http://php.net/class.datetime) object | that were posted after the date represented by the object.
63-
64-
::: code
65-
```twig Twig
66-
{# Fetch events posted this month #}
67-
{% set firstDayOfMonth = date('first day of this month') %}
68-
69-
{% set events = craft.events.events()
70-
.after(firstDayOfMonth)
71-
.all() %}
72-
```
73-
74-
```php PHP
75-
// Fetch events posted this month
76-
$firstDayOfMonth = new \DateTime('first day of this month');
77-
78-
$events = \verbb\events\elements\Event::find()
79-
->after($firstDayOfMonth)
80-
->all();
81-
```
82-
:::
83-
84-
85-
8654
### `anyStatus`
8755
Clears out the [status()](https://docs.craftcms.com/api/v4/craft-elements-db-elementquery.html#method-status) and [enabledForSite()](https://docs.craftcms.com/api/v4/craft-elements-db-elementquery.html#method-enabledforsite) parameters.
8856

@@ -125,38 +93,6 @@ $events = \verbb\events\elements\Event::find()
12593

12694

12795

128-
### `before`
129-
Narrows the query results to only events that were posted before a certain date.
130-
131-
Possible values include:
132-
133-
| Value | Fetches events…
134-
| - | -
135-
| `'2018-04-01'` | that were posted before 2018-04-01.
136-
| a [DateTime](http://php.net/class.datetime) object | that were posted before the date represented by the object.
137-
138-
::: code
139-
```twig Twig
140-
{# Fetch events posted before this month #}
141-
{% set firstDayOfMonth = date('first day of this month') %}
142-
143-
{% set events = craft.events.events()
144-
.before(firstDayOfMonth)
145-
.all() %}
146-
```
147-
148-
```php PHP
149-
// Fetch events posted before this month
150-
$firstDayOfMonth = new \DateTime('first day of this month');
151-
152-
$events = \verbb\events\elements\Event::find()
153-
->before($firstDayOfMonth)
154-
->all();
155-
```
156-
:::
157-
158-
159-
16096
### `customer`
16197
Narrows the query results to only events that have been purchased by a customer.
16298

0 commit comments

Comments
 (0)