nti /notification-bundle
Symfony 2 通知组件。
v1.1.4
2021-05-21 14:17 UTC
Requires
- php: >=5.6
- guzzlehttp/guzzle: >=6.0
- jms/serializer-bundle: >=2.0
- symfony/framework-bundle: ~2.8|~3.0|~4.0
This package is auto-updated.
Last update: 2024-09-21 21:47:12 UTC
README
此组件提供在多个应用程序中注册和发送通知的能力。
安装
步骤 1: 下载组件
打开命令行,进入项目目录,并执行以下命令以下载此组件的最新稳定版本
$ composer require nti/notification-bundle
此命令要求您全局安装了Composer,具体请参考Composer文档中的安装章节。
步骤 2: 启用组件
然后,通过将其添加到项目 app/AppKernel.php
文件中注册的组件列表中来启用组件。
class AppKernel extends Kernel { public function registerBundles() { $bundles = array( new NTI\NotificationBundle\NotificationBundle(), ); } }
步骤 3: 配置
在 config.yml
文件中填写组件配置。
nti_notification: user_destination_get_method: getEmail user_authentication_roles: [ROLE_USER]
组件使用您的用户类实体作为通知目的地,因此您可以轻松设置您的安全认证角色和您想用作目的地标识的唯一属性获取方法。