joubjoub / notification-bundle
为您的Symfony2应用程序提供通知功能。
dev-master
2015-06-18 20:52 UTC
This package is not auto-updated.
Last update: 2024-09-28 17:54:35 UTC
README
为Symfony2提供通知组件
安装
使用composer安装:
composer require joubjoub/notification-bundle dev-master
您应该创建实体 UserNotification
、Notification
,并为您的用户实体实现 NotifiableInterface
。
使用方法
然后,您应该能够使用服务 joubjoub.notification
添加通知,如下所示:
// $users can be an array of NotifiableInterface object, or a NotifiableInterface object $this->get('joubjoub.notification')->addNotification($users, $notification);
## 许可证 本组件受MIT许可证保护。
单元测试
单元测试将很快推出。