@@ -16,8 +16,8 @@ Get the Notifier installed using:
16
16
17
17
.. _channels-chatters-texters-email-and-browser :
18
18
19
- Channels: Chatters, Texters, Email, Browser and Push
20
- ----------------------------------------------------
19
+ Channels: Chatters, Texters, Email, Browser, Push and Desktop
20
+ -------------------------------------------------------------
21
21
22
22
The notifier component can send notifications to different channels. Each
23
23
channel can integrate with different providers (e.g. Slack or Twilio SMS)
@@ -32,6 +32,7 @@ The notifier component supports the following channels:
32
32
* :ref: `Email channel <notifier-email-channel >` integrates the :doc: `Symfony Mailer </mailer >`;
33
33
* Browser channel uses :ref: `flash messages <flash-messages >`.
34
34
* :ref: `Push channel <notifier-push-channel >` sends notifications to phones and browsers via push notifications.
35
+ * :ref: `Desktop channel <notifier-desktop-channel >` displays desktop notifications on the same host machine.
35
36
36
37
.. tip ::
37
38
@@ -623,6 +624,79 @@ configure the ``texter_transports``:
623
624
;
624
625
};
625
626
627
+ .. _notifier-desktop-channel :
628
+
629
+ Desktop Channel
630
+ ~~~~~~~~~~~~~~~
631
+
632
+ The desktop channel is used to display desktop notifications on the same host machine using
633
+ :class: `Symfony\\ Component\\ Notifier\\ Texter ` classes. Currently, Symfony
634
+ is integrated with the following providers:
635
+
636
+ =============== ==================================== ==============================================================================
637
+ Provider Package DSN
638
+ =============== ==================================== ==============================================================================
639
+ `JoliNotif `_ ``symfony/joli-notif-notifier `` ``jolinotif://default ``
640
+ =============== ==================================== ==============================================================================
641
+
642
+ .. versionadded: 7.2
643
+
644
+ The JoliNotif bridge was introduced in Symfony 7.2.
645
+
646
+ To enable a texter, add the correct DSN in your ``.env `` file and
647
+ configure the ``texter_transports ``:
648
+
649
+ .. code-block :: bash
650
+
651
+ # .env
652
+ JOLINOTIF=jolinotif://default
653
+
654
+ .. configuration-block ::
655
+
656
+ .. code-block :: yaml
657
+
658
+ # config/packages/notifier.yaml
659
+ framework :
660
+ notifier :
661
+ texter_transports :
662
+ jolinotif : ' %env(JOLINOTIF)%'
663
+
664
+ .. code-block :: xml
665
+
666
+ <!-- config/packages/notifier.xml -->
667
+ <?xml version =" 1.0" encoding =" UTF-8" ?>
668
+ <container xmlns =" http://symfony.com/schema/dic/services"
669
+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
670
+ xmlns : framework =" http://symfony.com/schema/dic/symfony"
671
+ xsi : schemaLocation =" http://symfony.com/schema/dic/services
672
+ https://symfony.com/schema/dic/services/services-1.0.xsd
673
+ http://symfony.com/schema/dic/symfony
674
+ https://symfony.com/schema/dic/symfony/symfony-1.0.xsd" >
675
+
676
+ <framework : config >
677
+ <framework : notifier >
678
+ <framework : texter-transport name =" jolinotif" >
679
+ %env(JOLINOTIF)%
680
+ </framework : texter-transport >
681
+ </framework : notifier >
682
+ </framework : config >
683
+ </container >
684
+
685
+ .. code-block :: php
686
+
687
+ // config/packages/notifier.php
688
+ use Symfony\Config\FrameworkConfig;
689
+
690
+ return static function (FrameworkConfig $framework): void {
691
+ $framework->notifier()
692
+ ->texterTransport('jolinotif', env('JOLINOTIF'))
693
+ ;
694
+ };
695
+
696
+ .. versionadded :: 7.2
697
+
698
+ The ``Desktop `` channel was introduced in Symfony 7.2.
699
+
626
700
Configure to use Failover or Round-Robin Transports
627
701
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
628
702
@@ -926,9 +1000,10 @@ and its ``asChatMessage()`` method::
926
1000
927
1001
The
928
1002
:class: `Symfony\\ Component\\ Notifier\\ Notification\\ SmsNotificationInterface `,
929
- :class: `Symfony\\ Component\\ Notifier\\ Notification\\ EmailNotificationInterface `
930
- and
1003
+ :class: `Symfony\\ Component\\ Notifier\\ Notification\\ EmailNotificationInterface `,
931
1004
:class: `Symfony\\ Component\\ Notifier\\ Notification\\ PushNotificationInterface `
1005
+ and
1006
+ :class: `Symfony\\ Component\\ Notifier\\ Notification\\ DesktopNotificationInterface `
932
1007
also exists to modify messages sent to those channels.
933
1008
934
1009
Customize Browser Notifications (Flash Messages)
@@ -1114,6 +1189,7 @@ is dispatched. Listeners receive a
1114
1189
.. _`Infobip` : https://github.com/symfony/symfony/blob/{version}/src/Symfony/Component/Notifier/Bridge/Infobip/README.md
1115
1190
.. _`Iqsms` : https://github.com/symfony/symfony/blob/{version}/src/Symfony/Component/Notifier/Bridge/Iqsms/README.md
1116
1191
.. _`iSendPro` : https://github.com/symfony/symfony/blob/{version}/src/Symfony/Component/Notifier/Bridge/Isendpro/README.md
1192
+ .. _`JoliNotif` : https://github.com/symfony/symfony/blob/{version}/src/Symfony/Component/Notifier/Bridge/JoliNotif/README.md
1117
1193
.. _`KazInfoTeh` : https://github.com/symfony/symfony/blob/{version}/src/Symfony/Component/Notifier/Bridge/KazInfoTeh/README.md
1118
1194
.. _`LINE Notify` : https://github.com/symfony/symfony/blob/{version}/src/Symfony/Component/Notifier/Bridge/LineNotify/README.md
1119
1195
.. _`LightSms` : https://github.com/symfony/symfony/blob/{version}/src/Symfony/Component/Notifier/Bridge/LightSms/README.md
0 commit comments