File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
src/AppBundle/EventListener Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -66,12 +66,15 @@ public function onCommentCreated(GenericEvent $event)
66
66
$ comment = $ event ->getSubject ();
67
67
$ post = $ comment ->getPost ();
68
68
69
- $ linkToPost = $ this ->urlGenerator ->generate ('blog_post ' , ['slug ' => $ post ->getSlug ()], UrlGeneratorInterface::ABSOLUTE_URL );
69
+ $ linkToPost = $ this ->urlGenerator ->generate ('blog_post ' , [
70
+ 'slug ' => $ post ->getSlug (),
71
+ '_fragment ' => 'comment_ ' .$ comment ->getId (),
72
+ ], UrlGeneratorInterface::ABSOLUTE_URL );
70
73
71
- $ subject = $ this ->translator ->trans ('post.recieved_comment ' );
72
- $ body = $ this ->translator ->trans ('post.recieved_comment_message ' , [
74
+ $ subject = $ this ->translator ->trans ('post.comment_added ' );
75
+ $ body = $ this ->translator ->trans ('post.comment_added.description ' , [
73
76
'%title% ' => $ post ->getTitle (),
74
- '%link% ' => $ linkToPost. ' #comment_ ' . $ comment -> getId () ,
77
+ '%link% ' => $ linkToPost ,
75
78
]);
76
79
77
80
// Symfony uses a library called SwiftMailer to send emails. That's why
You can’t perform that action at this time.
0 commit comments