/**
  * @see	\wcf\system\user\notification\event\IUserNotificationEvent::getLink()
  */
 public function getLink()
 {
     $owner = WCF::getUser();
     if ($this->additionalData['objectID'] != WCF::getUser()->userID) {
         $owner = CommentDataHandler::getInstance()->getUser($this->additionalData['objectID']);
     }
     return LinkHandler::getInstance()->getLink('User', array('object' => $owner), '#wall');
 }
 /**
  * @see	\wcf\system\user\notification\event\IUserNotificationEvent::getMessage()
  */
 public function getMessage()
 {
     $entry = EntryDataHandler::getInstance()->getEntry($this->additionalData['objectID']);
     $authors = array_values($this->getAuthors());
     $count = count($authors);
     $commentUser = null;
     if ($this->additionalData['commentUserID'] != WCF::getUser()->userID) {
         $commentUser = CommentDataHandler::getInstance()->getUser($this->additionalData['commentUserID']);
     }
     if ($count > 1) {
         return $this->getLanguage()->getDynamicVariable('cms.news.notification.commentResponse.like.message.stacked', array('author' => $this->author, 'authors' => $authors, 'commentUser' => $commentUser, 'count' => $count, 'others' => $count - 1, 'entry' => $entry));
     }
     return $this->getLanguage()->getDynamicVariable('cms.news.notification.commentResponse.like.message', array('author' => $this->author, 'entry' => $entry));
 }
 /**
  * @see	\wcf\system\user\notification\event\IUserNotificationEvent::getMessage()
  */
 public function getMessage()
 {
     $comment = CommentDataHandler::getInstance()->getComment($this->userNotificationObject->commentID);
     if ($comment->userID) {
         $commentAuthor = CommentDataHandler::getInstance()->getUser($comment->userID);
     } else {
         $commentAuthor = new User(null, array('username' => $comment->username));
     }
     $authors = $this->getAuthors();
     if (count($authors) > 1) {
         if (isset($authors[0])) {
             unset($authors[0]);
         }
         $count = count($authors);
         return $this->getLanguage()->getDynamicVariable('wcf.user.notification.commentResponseOwner.message.stacked', array('author' => $commentAuthor, 'authors' => array_values($authors), 'count' => $count, 'others' => $count - 1, 'guestTimesTriggered' => $this->notification->guestTimesTriggered));
     }
     return $this->getLanguage()->getDynamicVariable('wcf.user.notification.commentResponseOwner.message', array('author' => $this->author, 'commentAuthor' => $commentAuthor));
 }
 /**
  * @see    \wcf\system\user\notification\event\IUserNotificationEvent::getEmailMessage()
  */
 public function getEmailMessage($notificationType = 'instant')
 {
     $comment = CommentDataHandler::getInstance()->getComment($this->userNotificationObject->commentID);
     if ($comment->userID) {
         $commentAuthor = CommentDataHandler::getInstance()->getUser($comment->userID);
     } else {
         $commentAuthor = new User(null, array('username' => $comment->username));
     }
     $entry = EntryDataHandler::getInstance()->getEntry($comment->objectID);
     $authors = $this->getAuthors();
     if (count($authors) > 1) {
         if (isset($authors[0])) {
             unset($authors[0]);
         }
         $count = count($authors);
         return $this->getLanguage()->getDynamicVariable('filebase.notification.commentResponseOwner.mail.stacked', array('author' => $this->author, 'authors' => array_values($authors), 'commentAuthor' => $commentAuthor, 'count' => $count, 'entry' => $entry, 'notificationType' => $notificationType, 'others' => $count - 1, 'response' => $this->userNotificationObject, 'guestTimesTriggered' => $this->notification->guestTimesTriggered));
     }
     return $this->getLanguage()->getDynamicVariable('filebase.notification.commentResponseOwner.mail', array('entry' => $entry, 'author' => $this->author, 'commentAuthor' => $commentAuthor, 'response' => $this->userNotificationObject, 'notificationType' => $notificationType));
 }
 /**
  * @see	\wcf\system\user\notification\event\IUserNotificationEvent::getLink()
  */
 public function getLink()
 {
     $comment = CommentDataHandler::getInstance()->getComment($this->userNotificationObject->commentID);
     $user = CommentDataHandler::getInstance()->getUser($comment->objectID);
     return LinkHandler::getInstance()->getLink('User', array('object' => $user), '#wall');
 }
 /**
  * @see	\wcf\system\user\notification\event\AbstractUserNotificationEvent::prepare()
  */
 protected function prepare()
 {
     EntryDataHandler::getInstance()->cacheEntryID($this->additionalData['objectID']);
     CommentDataHandler::getInstance()->cacheUserID($this->additionalData['userID']);
 }