From 4125af953f238a6af2079938c50243b78630efac Mon Sep 17 00:00:00 2001 From: Oleg Voronkovich Date: Mon, 9 Jan 2017 19:40:29 +0300 Subject: [PATCH] Add note about event listener's method --- app/config/services.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/config/services.yml b/app/config/services.yml index efc0e9cab..8122ec9eb 100644 --- a/app/config/services.yml +++ b/app/config/services.yml @@ -34,6 +34,9 @@ services: app.comment_notification: class: AppBundle\EventListener\CommentNotificationListener arguments: ['@mailer', '@router', '@translator', '%app.notifications.email_sender%'] + # There is an optional tag attribute called "method" which defines which method to execute when the event is triggered. + # By default the name of the method is on + "camel-cased event name". + # If the event is "comment.created" the method executed by default is onCommentCreated(). tags: - { name: kernel.event_listener, event: comment.created, method: onCommentCreated }