Skip to content

Commit a03ba22

Browse files
committed
IBX-9060: Document revamped notifications
1 parent 2f97da3 commit a03ba22

File tree

10 files changed

+106
-7
lines changed

10 files changed

+106
-7
lines changed

docs/api/event_reference/other_events.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
description: Events that are triggered when working with bookmarks, notifications, settings, forms and others.
33
page_type: reference
4+
month_change: true
45
---
56

67
# Other events
@@ -22,12 +23,14 @@ The following events refer to [notifications displayed in the user menu](notific
2223

2324
| Event | Dispatched by | Properties |
2425
|---|---|---|
25-
|`BeforeCreateNotificationEvent`|`NotificationService::createNotification`|`CreateStruct $createStruct`</br>`Notification|null $notification`|
26-
|`CreateNotificationEvent`|`NotificationService::createNotification`|`Notification $notification`</br>`CreateStruct $createStruct`|
27-
|`BeforeDeleteNotificationEvent`|`NotificationService::deleteNotification`|`Notification $notification`|
28-
|`DeleteNotificationEvent`|`NotificationService::deleteNotification`|`Notification $notification`|
29-
|`BeforeMarkNotificationAsReadEvent`|`NotificationService::markNotificationAsRead`|`Notification $notification`|
30-
|`MarkNotificationAsReadEvent`|`NotificationService::markNotificationAsRead`|`Notification $notification`|
26+
|[`BeforeCreateNotificationEvent`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Core-Repository-Events-Notification-BeforeCreateNotificationEvent.html)|[`NotificationService::createNotification`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Core-Repository-NotificationService.html#method_createNotification)|`CreateStruct $createStruct`</br>`Notification|null $notification`|
27+
|[`CreateNotificationEvent`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Core-Repository-Events-Notification-CreateNotificationEvent.html)|[`NotificationService::createNotification`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Core-Repository-NotificationService.html#method_createNotification)|`Notification $notification`</br>`CreateStruct $createStruct`|
28+
|[`BeforeDeleteNotificationEvent`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Core-Repository-Events-Notification-BeforeDeleteNotificationEvent.html)|[`NotificationService::deleteNotification`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Core-Repository-NotificationService.html#method_deleteNotification)|`Notification $notification`|
29+
|[`DeleteNotificationEvent`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Core-Repository-Events-Notification-DeleteNotificationEvent.html)|[`NotificationService::deleteNotification`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Core-Repository-NotificationService.html#method_deleteNotification)|`Notification $notification`|
30+
|[`BeforeMarkNotificationAsReadEvent`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Core-Repository-Events-Notification-BeforeMarkNotificationAsReadEvent.html)|[`NotificationService::markNotificationAsRead`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Core-Repository-NotificationService.html#method_markNotificationAsRead)|`Notification $notification`|
31+
|[`MarkNotificationAsReadEvent`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Core-Repository-Events-Notification-MarkNotificationAsReadEvent.html)|[`NotificationService::markNotificationAsRead`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Core-Repository-NotificationService.html#method_markNotificationAsRead)|`Notification $notification`|
32+
|[`BeforeMarkNotificationAsUnreadEvent`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Core-Repository-Events-Notification-BeforeMarkNotificationAsUnreadEvent.html)|[`NotificationService::markNotificationAsUnread`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Core-Repository-NotificationService.html#method_markNotificationAsUnread)|`Notification $notification`|
33+
|[`MarkNotificationAsUnreadEvent`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Core-Repository-Events-Notification-MarkNotificationAsUnreadEvent.html)|[`NotificationService::markNotificationAsUnread`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Core-Repository-NotificationService.html#method_markNotificationAsUnread)|`Notification $notification`|
3134

3235
## Settings
3336

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
description: Notification DateCreated Search Criterion
3+
month_change: true
4+
---
5+
6+
# Notification DateCreated Criterion
7+
8+
The `DateCreated` Search Criterion searches for notifications based on the date when they were created.
9+
10+
## Arguments
11+
12+
- `created` - date to be matched, provided as a `DateTimeInterface` object
13+
- `operator` - optional operator string (GTE, LTE)
14+
15+
## Example
16+
17+
### PHP
18+
19+
``` php
20+
$criteria = new Ibexa\Contracts\Core\Repository\Values\Notification\Query\Criterion\DateCreated(
21+
new DateTime('2023-03-01 14:07:02'),
22+
'GTE'
23+
);
24+
25+
$query = new NotificationQuery($criteria);
26+
```
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
description: Notification Search Criteria
3+
month_change: true
4+
---
5+
6+
# Notification Search Criteria reference
7+
8+
Notification Search Criteria are only supported by Notification Search (`NotificationService::findNotifications`).
9+
10+
With these Criteria you can filter notifications by their notification creation date, notification status, and notification type.
11+
12+
## Notification Search Criteria
13+
14+
|Search Criterion|Search based on|
15+
|-----|-----|
16+
|[DateCreated](notification_datecreated_criterion.md)|Date and time when notification was created|
17+
|[Status](notification_status_criterion.md)|Status of the notification|
18+
|[Type](notification_type_criterion.md)|Type of the notification|
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
description: Notification Status Search Criterion
3+
month_change: true
4+
---
5+
6+
# Notification Status Criterion
7+
8+
The `Status` Search Criterion searches for notifications based on notification status.
9+
10+
## Arguments
11+
12+
- `status` - Boolean value that represents the status of the notification
13+
14+
## Example
15+
16+
### PHP
17+
18+
``` php
19+
$criteria = new Ibexa\Contracts\Core\Repository\Values\Notification\Query\Criterion\(0);
20+
21+
$query = new NotificationQuery($criteria);
22+
```
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
description: Type Search Criterion
3+
month_change: true
4+
---
5+
6+
# Type Criterion
7+
8+
The `Type` Search Criterion searches for notifications by their types.
9+
10+
## Arguments
11+
12+
- `type` - string that represents the type of the notification, takes values defined in notification workflow
13+
14+
## Example
15+
16+
### PHP
17+
18+
``` php
19+
$criteria = new Ibexa\Contracts\Core\Repository\Values\Notification\Query\Criterion\Type('Workflow:Reject');
20+
21+
$query = new NotificationQuery($criteria);
22+
```

docs/templating/twig_function_reference/icon_twig_functions.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: Icon Twig functions enable referencing SVG icons in templates.
33
page_type: reference
4-
month_change: false
4+
month_change: true
55
---
66

77
# Icon Twig functions
@@ -181,6 +181,7 @@ The following icons are available out-of-the-box:
181181
| ![error-icon](img/icons/error-icon.svg.png) | `error-icon` |
182182
| ![error](img/icons/error.svg.png) | `error` |
183183
| ![expand-left](img/icons/expand-left.svg.png) | `expand-left` |
184+
| ![expand-right](img/icons/expand-right.png). | `expand-right` |
184185
| ![explore](img/icons/explore.svg.png) | `explore` |
185186
| ![events-collected](img/icons/events-collected.svg.png) | `events-collected` |
186187
| ![facebook](img/icons/facebook.svg.png) | `facebook` |
@@ -254,6 +255,7 @@ The following icons are available out-of-the-box:
254255
| ![logout](img/icons/logout.svg.png) | `logout` |
255256
| ![maform](img/icons/maform.svg.png) | `maform` |
256257
| ![mail](img/icons/mail.svg.png) | `mail` |
258+
| ![mail-open](img/icons/mail-open.png) | `mail-open` |
257259
| ![markup](img/icons/markup.svg.png) | `markup` |
258260
| ![media-type](img/icons/media-type.svg.png) | `media-type` |
259261
| ![media](img/icons/media.svg.png) | `media` |
Loading
Loading
Loading

mkdocs.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -670,6 +670,12 @@ nav:
670670
- UserCriterion: search/activity_log_search_reference/user_criterion.md
671671
- Action Configuration Search Criteria: search/ai_actions_search_reference/action_configuration_criteria.md
672672
- Discounts Search Criteria: search/discounts_search_reference/discounts_criteria.md
673+
- Notification Search Criteria:
674+
- Notification Search Criteria: search/criteria_reference/notification_search_criteria.md
675+
- DateCreated: search/criteria_reference/notification_datecreated_criterion.md
676+
- Status: search/criteria_reference/notification_status_criterion.md
677+
- Type: search/criteria_reference/notification_type_criterion.md
678+
673679
- Sort Clause reference:
674680
- General Sort Clauses:
675681
- General Sort Clause reference: search/sort_clause_reference/sort_clause_reference.md

0 commit comments

Comments
 (0)