Skip to content

Commit f25faeb

Browse files
committed
notification_channels.md: Fix ordered lists
1 parent d12055f commit f25faeb

1 file changed

Lines changed: 23 additions & 23 deletions

File tree

docs/api/notification_channels.md

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -85,22 +85,22 @@ The following example shows how you can deliver notifications about Commerce-rel
8585

8686
1. Install the Slack Notifier package:
8787

88-
```bash
89-
composer require symfony/slack-notifier
90-
```
88+
```bash
89+
composer require symfony/slack-notifier
90+
```
9191

9292
2. In a .env file, [set the DSN to target a Slack channel or a Slack user](https://github.com/symfony/slack-notifier?tab=readme-ov-file#dsn-example):
9393

94-
```dotenv
95-
SLACK_DSN=slack://xoxb-token@default?channel=ibexa-notifications
96-
```
94+
```dotenv
95+
SLACK_DSN=slack://xoxb-token@default?channel=ibexa-notifications
96+
```
9797

9898
3. Subscribe to notification types related to Commerce, such as order, payment, and shipment status changes.
99-
For example, define the following configuration in a new `config/packages/notifications.yaml` file:
99+
For example, define the following configuration in a new `config/packages/notifications.yaml` file:
100100

101-
``` yaml hl_lines="12-20"
102-
[[= include_code('code_samples/api/notifications/config/packages/notifications.yaml', 1, 20) =]]
103-
```
101+
``` yaml hl_lines="12-20"
102+
[[= include_code('code_samples/api/notifications/config/packages/notifications.yaml', 1, 20, indent_level=1) =]]
103+
```
104104

105105
## Create notification class
106106

@@ -159,26 +159,26 @@ The following example is a command that sends a notification to users on several
159159
This example could be a scheduled task or cron job that warns users about its result.
160160
161161
1. First, create a `CommandExecuted` notification type.
162-
It supports two channels (`ibexa`, `email`), but could be extended to support more.
163-
As constructor arguments, an instance takes the command itself, the exit code of the run, and any caught exceptions.
162+
It supports two channels (`ibexa`, `email`), but could be extended to support more.
163+
As constructor arguments, an instance takes the command itself, the exit code of the run, and any caught exceptions.
164164
165-
``` php
166-
[[= include_code('code_samples/api/notifications/src/Notifications/CommandExecuted.php') =]]
167-
```
165+
``` php
166+
[[= include_code('code_samples/api/notifications/src/Notifications/CommandExecuted.php', indent_level=1) =]]
167+
```
168168
169169
2. Assign channels subscribed to this notification in `config/packages/notifications.yaml`:
170170
171-
``` yaml hl_lines="17-20"
172-
[[= include_code('code_samples/api/notifications/config/packages/notifications.yaml', 5, 24) =]]
173-
```
171+
``` yaml hl_lines="17-20"
172+
[[= include_code('code_samples/api/notifications/config/packages/notifications.yaml', 5, 24, indent_level=1) =]]
173+
```
174174
175175
3. Create a command sending a `CommandExecuted` notification at the end of execution:
176-
It randomly succeeds or fails to demonstrate how notifications can communicate different execution results.
177-
It could be declared as a service to set the list of recipients' logins (`$recipientLogins`) from a configuration file.
176+
It randomly succeeds or fails to demonstrate how notifications can communicate different execution results.
177+
It could be declared as a service to set the list of recipients' logins (`$recipientLogins`) from a configuration file.
178178

179-
``` php
180-
[[= include_code('code_samples/api/notifications/src/Command/NotificationSenderCommand.php') =]]
181-
```
179+
``` php
180+
[[= include_code('code_samples/api/notifications/src/Command/NotificationSenderCommand.php', indent_level=1) =]]
181+
```
182182

183183
When you execute this command, it fails randomly and notifies the Administrator user about the result.
184184

0 commit comments

Comments
 (0)