sogabundle / notificaciones-vanadio
notificaciones - vanadio
2.0.4
2018-04-02 18:44 UTC
Requires
- doctrine/doctrine-bundle: *
- symfony/framework-bundle: >=2.7 <4
- twig/twig: *
This package is not auto-updated.
Last update: 2024-10-02 20:31:53 UTC
README
以高效的方式创建和管理通知。
支持的Symfony版本
- 2.7.x
- 2.8.x
- 3.x
功能
- 简单配置
- 易于使用
- 强大的通知管理
- 简单的Twig渲染方法
- 完全可定制
- 多个通知实体
- 无冗余依赖(需求小)
注意:目前仅支持Doctrine ORM。
安装与使用
安装
此包可在packagist上找到。
首先
$ composer require mgilet/notification-bundle
查看文档获取下一步操作
基本使用
class MyController extends Controller { ... public function sendNotification(Request $request) { $manager = $this->get('mgilet.notification'); $notif = $manager->createNotification('Hello world !'); $notif->setMessage('This a notification.'); $notif->setLink('https://symfony.com.cn/'); // or the one-line method : // $manager->createNotification('Notification subject','Some random text','http://google.fr'); // you can add a notification to a list of entities // the third parameter `$flush` allows you to directly flush the entities $manager->addNotification(array($this->getUser()), $notif, true); ... }
更多详情请查看这里
翻译
目前此包已翻译成德语、英语、西班牙语、法语、意大利语。
通过提交您的翻译来帮助我改进。
社区
您可以通过贡献(每个pull request都将被考虑)或提交问题来帮助改进此包。
如果您喜欢,请享受并分享。
许可证
MIT