Skip to content

Commit

Permalink
Add note about event listener's method
Browse files Browse the repository at this point in the history
  • Loading branch information
voronkovich committed Jan 9, 2017
1 parent f3b258a commit 4125af9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/config/services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }

Expand Down

0 comments on commit 4125af9

Please sign in to comment.