@@ -16,8 +16,8 @@ Get the Notifier installed using:
1616
1717 .. _channels-chatters-texters-email-and-browser :
1818
19- Channels: Chatters, Texters, Email, Browser and Push
20- ----------------------------------------------------
19+ Channels: Chatters, Texters, Email, Browser, Push and Desktop
20+ -------------------------------------------------------------
2121
2222The notifier component can send notifications to different channels. Each
2323channel can integrate with different providers (e.g. Slack or Twilio SMS)
@@ -32,6 +32,7 @@ The notifier component supports the following channels:
3232* :ref: `Email channel <notifier-email-channel >` integrates the :doc: `Symfony Mailer </mailer >`;
3333* Browser channel uses :ref: `flash messages <flash-messages >`.
3434* :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.
3536
3637.. tip ::
3738
@@ -623,6 +624,71 @@ configure the ``texter_transports``:
623624 ;
624625 };
625626
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+ To enable a texter, add the correct DSN in your ``.env `` file and
643+ configure the ``texter_transports ``:
644+
645+ .. code-block :: bash
646+
647+ # .env
648+ JOLINOTIF=jolinotif://default
649+
650+ .. configuration-block ::
651+
652+ .. code-block :: yaml
653+
654+ # config/packages/notifier.yaml
655+ framework :
656+ notifier :
657+ texter_transports :
658+ jolinotif : ' %env(JOLINOTIF)%'
659+
660+ .. code-block :: xml
661+
662+ <!-- config/packages/notifier.xml -->
663+ <?xml version =" 1.0" encoding =" UTF-8" ?>
664+ <container xmlns =" http://symfony.com/schema/dic/services"
665+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
666+ xmlns : framework =" http://symfony.com/schema/dic/symfony"
667+ xsi : schemaLocation =" http://symfony.com/schema/dic/services
668+ https://symfony.com/schema/dic/services/services-1.0.xsd
669+ http://symfony.com/schema/dic/symfony
670+ https://symfony.com/schema/dic/symfony/symfony-1.0.xsd" >
671+
672+ <framework : config >
673+ <framework : notifier >
674+ <framework : texter-transport name =" jolinotif" >
675+ %env(JOLINOTIF)%
676+ </framework : texter-transport >
677+ </framework : notifier >
678+ </framework : config >
679+ </container >
680+
681+ .. code-block :: php
682+
683+ // config/packages/notifier.php
684+ use Symfony\Config\FrameworkConfig;
685+
686+ return static function (FrameworkConfig $framework): void {
687+ $framework->notifier()
688+ ->texterTransport('jolinotif', env('JOLINOTIF'))
689+ ;
690+ };
691+
626692 Configure to use Failover or Round-Robin Transports
627693~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
628694
0 commit comments