Skip to content

Commit 6d0b9b6

Browse files
committed
Vale fixes, syntax fixes
1 parent 82ddf9c commit 6d0b9b6

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

docs/design/notifications.rst

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ Notification types
144144
==================
145145

146146
The ``$type`` parameter determines the visual style of the notification:
147+
147148
.. vale off
148149
149150
- ``'success'``: green alert with success icon
@@ -179,7 +180,21 @@ Here's how to create a notification when you schedule a Contact export:
179180
}
180181
181182
This use case shows how to integrate the NotificationModel into event-driven processes within Mautic.
182-
This example calls the ``addNotification`` method with specific parameters tailored to the Contact export scenario. The Translator service handles the ``$message`` parameter to generate a localized message. This approach includes the User's Email address in the notification message. The system uses the translation key ``mautic.lead.export.being.prepared`` with the parameter ``%user_email%``, replacing it with the actual Email of the User who scheduled the export. This method allows for dynamic content insertion into the translated string.
183-
If the User's Email weren't needed in the message, the system could have used a normal translation string without parameter replacement.
184183

185-
The other parameters in the ``addNotification`` call are equally important. The system styles the notification as an informational alert using the ``info`` type, which is appropriate for a status update on a scheduled task. The false value for ``$isRead`` ensures that the notification appears as unread, drawing the User's attention to this new information. The header, like the message, uses a translation key ``mautic.lead.export.being.prepared.header`` to maintain language consistency. Null values for the icon class and ``datetime`` mean that the system uses default values for these optional parameters. Finally, by passing the ``$user`` object, the notification is specifically associated with the user who initiated the export, ensuring it appears in their personal notification panel.
184+
It calls the ``addNotification`` method with specific parameters tailored to the Contact export scenario. The Translator service handles the ``$message`` parameter to generate a localized message.
185+
186+
This approach includes the User's Email address in the notification message. The system uses the translation key ``mautic.lead.export.being.prepared`` with the parameter ``%user_email%``, replacing it with the actual Email of the User who scheduled the export.
187+
188+
This method allows for dynamic content insertion into the translated string. If the User's Email weren't needed in the message, the system could have used a normal translation string without parameter replacement.
189+
190+
The other parameters in the ``addNotification`` call are equally important.
191+
192+
The system styles the notification as an informational alert using the ``info`` type, which is appropriate for a status update on a scheduled task.
193+
194+
The false value for ``$isRead`` ensures that the notification appears as unread, drawing the User's attention to this new information.
195+
196+
The header, like the message, uses a translation key ``mautic.lead.export.being.prepared.header`` to maintain language consistency.
197+
198+
Null values for the icon class and ``datetime`` mean that the system uses default values for these optional parameters.
199+
200+
Finally, by passing the ``$user`` object, the notification is specifically associated with the User who initiated the export, ensuring it appears in their personal notification panel.

0 commit comments

Comments
 (0)