Skip to content

Commit 4125af9

Browse files
committed
Add note about event listener's method
1 parent f3b258a commit 4125af9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

app/config/services.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ services:
3434
app.comment_notification:
3535
class: AppBundle\EventListener\CommentNotificationListener
3636
arguments: ['@mailer', '@router', '@translator', '%app.notifications.email_sender%']
37+
# There is an optional tag attribute called "method" which defines which method to execute when the event is triggered.
38+
# By default the name of the method is on + "camel-cased event name".
39+
# If the event is "comment.created" the method executed by default is onCommentCreated().
3740
tags:
3841
- { name: kernel.event_listener, event: comment.created, method: onCommentCreated }
3942

0 commit comments

Comments
 (0)