Notification: add a counter for notifications

This commit is contained in:
2022-01-04 16:44:01 +01:00
parent 5bb5468198
commit 3a207b2c5d
12 changed files with 211 additions and 29 deletions

View File

@@ -22,3 +22,30 @@ services:
Chill\MainBundle\Notification\Templating\NotificationTwigExtension: ~
Chill\MainBundle\Notification\Templating\NotificationTwigExtensionRuntime: ~
Chill\MainBundle\Notification\Counter\NotificationByUserCounter:
autoconfigure: true
autowire: true
tags:
-
name: 'doctrine.orm.entity_listener'
event: 'preFlush'
entity: 'Chill\MainBundle\Entity\Notification'
# set the 'lazy' option to TRUE to only instantiate listeners when they are used
lazy: true
method: 'onPreFlushNotification'
-
name: 'doctrine.orm.entity_listener'
event: 'postUpdate'
entity: 'Chill\MainBundle\Entity\NotificationComment'
# set the 'lazy' option to TRUE to only instantiate listeners when they are used
lazy: true
method: 'onEditNotificationComment'
-
name: 'doctrine.orm.entity_listener'
event: 'postPersist'
entity: 'Chill\MainBundle\Entity\NotificationComment'
# set the 'lazy' option to TRUE to only instantiate listeners when they are used
lazy: true
method: 'onEditNotificationComment'