symfony/novu-notifier
最新稳定版本:v8.0.0
Composer 安装命令:
composer require symfony/novu-notifier
包简介
Provides Novu integration for Symfony Notifier.
关键字:
README 文档
README
Provides Novu integration for Symfony Notifier.
DSN example
NOVU_DSN=novu://API_KEY@default
Notification example
class NovuNotification extends Notification implements PushNotificationInterface { public function asPushMessage( NovuSubscriberRecipient|RecipientInterface $recipient, ?string $transport = null, ): ?PushMessage { return new PushMessage( $this->getSubject(), $this->getContent(), new NovuOptions( $recipient->getSubscriberId(), $recipient->getFirstName(), $recipient->getLastName(), $recipient->getEmail(), $recipient->getPhone(), $recipient->getAvatar(), $recipient->getLocale(), $recipient->getOverrides(), [], ), ); } }
$notification = new NovuNotification; $notification->subject('test'); $notification->channels(['push']); $notification->content( json_encode( [ 'param1' => 'Lorum Ipsum', ] ) ); $this->notifier->send( $notification, new NovuSubscriberRecipient( "123", 'Wouter', 'van der Loop', 'woutervdl@toppy.nl', null, null, null, [ 'email' => [ 'from' => 'no-reply@toppy.nl', 'senderName' => 'No-Reply', ], ], ), );
Resources
统计信息
- 总下载量: 4.99k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 5
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-06-20