nti/notification-bundle

Symfony 2 通知组件。

安装次数: 1,832

依赖者: 0

建议者: 0

安全: 0

星级: 3

关注者: 2

分支: 3

开放问题: 0

类型:symfony-bundle

v1.1.4 2021-05-21 14:17 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]

组件使用您的用户类实体作为通知目的地,因此您可以轻松设置您的安全认证角色和您想用作目的地标识的唯一属性获取方法。

文档