EventQueryBuilder
EventQueryBuilder.php
:
27
Allows to build event query in a fluent way.
The following example query is searching for events occurring in 2020, and typed 'scheduled_publication':
$query = (new EventQueryBuilder())
->withDateRange(new DateRange(new DateTime('2020-01-01'), new DateTime('2021-01-01')))
->withTypes(['scheduled_publication'])
->getQuery();
Methods¶
__construct() ¶
EventQueryBuilder.php
:
44
|
|
fromQuery() ¶
EventQueryBuilder.php
:
110
|
|
Parameters
Name | Type | Default value | Description |
---|---|---|---|
$query | EventQuery | - | - |
Return values
self
getQuery() ¶
EventQueryBuilder.php
:
95
Builds the query.
|
|
Return values
Tags
withCount() ¶
EventQueryBuilder.php
:
49
|
|
Parameters
Name | Type | Default value | Description |
---|---|---|---|
$count | int | - | - |
Return values
self
withCursor() ¶
EventQueryBuilder.php
:
63
|
|
Parameters
Name | Type | Default value | Description |
---|---|---|---|
$cursor | Cursor|null | - | - |
Return values
self
withDateRange() ¶
EventQueryBuilder.php
:
56
|
|
Parameters
Name | Type | Default value | Description |
---|---|---|---|
$dateRange | DateRange | - | - |
Return values
self
withLanguages() ¶
EventQueryBuilder.php
:
83
|
|
Parameters
Name | Type | Default value | Description |
---|---|---|---|
$languages | array<string|int, Language>|null | - | - |
Return values
self
withTypes() ¶
EventQueryBuilder.php
:
73
|
|
Parameters
Name | Type | Default value | Description |
---|---|---|---|
$types | array<string|int, string>|null | - | - |
Return values
self