示例#1
0
 /**
  * Dispatches new comment event.
  *
  * @param $username
  * @param $content
  * @param $postId
  */
 public function dispatchNewCommentEvent($username, $content, $postId)
 {
     $event = new NewCommentEvent();
     $event->setAuthorUsername($username);
     $event->setContent($content);
     $event->setPostId($postId);
     $this->getEventDispatcher()->dispatch('application_arferr_blog.event.new_comment', $event);
 }
示例#2
0
 /**
  * @param NewCommentEvent $event
  */
 public function onNewComment(NewCommentEvent $event)
 {
     //echo 'crmNotifier, onNewComment';
     $this->processRequest($event->toArray());
 }