79 lines
3.1 KiB
YAML

services:
_defaults:
autowire: true
autoconfigure: true
Chill\MainBundle\Notification\:
resource: ../../Notification/
autoconfigure: true
autowire: true
Chill\MainBundle\Notification\Mailer:
arguments:
$logger: '@Psr\Log\LoggerInterface'
$twig: '@Twig\Environment'
$mailer: '@swiftmailer.mailer.default'
# $mailerTransporter: '@swiftmailer.transport'
$router: '@Symfony\Component\Routing\RouterInterface'
$translator: '@Symfony\Contracts\Translation\TranslatorInterface'
$routeParameters: '%chill_main.notifications%'
Chill\MainBundle\Notification\NotificationHandlerManager:
arguments:
$handlers: !tagged_iterator chill_main.notification_handler
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'
Chill\MainBundle\Notification\Email\NotificationMailer:
autowire: true
autoconfigure: true
tags:
-
name: 'doctrine.orm.entity_listener'
event: 'postPersist'
entity: 'Chill\MainBundle\Entity\Notification'
# set the 'lazy' option to TRUE to only instantiate listeners when they are used
lazy: true
method: 'postPersistNotification'
-
name: 'doctrine.orm.entity_listener'
event: 'postUpdate'
entity: 'Chill\MainBundle\Entity\Notification'
# set the 'lazy' option to TRUE to only instantiate listeners when they are used
lazy: true
method: 'postUpdateNotification'
-
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: 'postPersistComment'