kalitics/notification-bundle 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

kalitics/notification-bundle

Composer 安装命令:

composer require kalitics/notification-bundle

包简介

Add notifications to symfony app

README 文档

README

Notifications management

Installation

Require the bundle using

composer require kalitics/notification-bundle

Create the file config/packages/kalitics_notification.yaml with the following content :

kalitics_notification:

Add a new path for template in config/packages/twig.yaml

twig:
    ...
    paths:
        '%kernel.project_dir%/vendor/kalitics/notification-bundle/src/Ressources/views': kaliticsNotification

Add a new entry in config/bundles.php to register the new bundle

Kalitics\NotificationBundle\KaliticsNotificationBundle::class => ['all' => true],

Create a new file config/routes/kalitics_notification.yaml

_kalitics_notification:
  resource: '@KaliticsNotificationBundle/Ressources/config/routes.xml'
  prefix: /kalitics/notifications/

Add the following in the application header to display the notifications icon

{{ include('@KaliticsNotification/icon/notifications_container.html.twig') }}

Add the following in the application layout to have the detail modal

{{ include('@KaliticsNotification/_includes/_modal.html.twig') }}

The management of notification Subscriptions is display using the following controller :

{{ render(path('kalitics_notification_subscription_manage', {'id' : app.user.id})) }}

important

There must be an entity User such as : `App\Entity\User\User`

There must be an entity Group such as : `App\Entity\Security\Group`

Database configuration

To get properly configured, the database need some informations such as Notification type and difusion lists using the following tables :

ntf_notification_subscription_included_groups
ntf_notification_subscription_included_members
ntf_notification_subscription_excluded_members

Usage

To trigger a notification,

$this->notificationService->generateNotification(NotificationTypeEnum::CREATE_USER);
//Where NotificationTypeEnum::CREATE_USER is the notification slug configured in database

统计信息

  • 总下载量: 257
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-03-12

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固