2 namespace wcf\system\user\notification\event;
3 use wcf\data\user\User;
4 use wcf\system\request\LinkHandler;
5 use wcf\system\user\notification\event\AbstractUserNotificationEvent;
9 * User notification event for profile commment likes.
11 * @author Alexander Ebert
12 * @copyright 2001-2014 WoltLab GmbH
13 * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
14 * @package com.woltlab.wcf
15 * @subpackage system.user.notification.event
16 * @category Community Framework
18 class UserProfileCommentLikeUserNotificationEvent extends AbstractUserNotificationEvent {
20 * @see \wcf\system\user\notification\event\AbstractUserNotificationEvent::$stackable
22 protected $stackable = true;
25 * @see \wcf\system\user\notification\event\IUserNotificationEvent::getTitle()
27 public function getTitle() {
28 $count = count($this->getAuthors());
30 return $this->getLanguage()->getDynamicVariable('wcf.user.notification.comment.like.title.stacked', array(
32 'timesTriggered' => $this->timesTriggered
36 return $this->getLanguage()->get('wcf.user.notification.comment.like.title');
40 * @see \wcf\system\user\notification\event\IUserNotificationEvent::getMessage()
42 public function getMessage() {
43 $authors = array_values($this->getAuthors());
44 $count = count($authors);
46 if ($this->additionalData['objectID'] != WCF::getUser()->userID) {
47 $owner = new User($this->additionalData['objectID']);
51 return $this->getLanguage()->getDynamicVariable('wcf.user.notification.comment.like.message.stacked', array(
52 'author' => $this->author,
53 'authors' => $authors,
54 'comment' => $this->userNotificationObject,
56 'others' => max($count - 1, 0),
61 return $this->getLanguage()->getDynamicVariable('wcf.user.notification.comment.like.message', array(
62 'author' => $this->author,
63 'comment' => $this->userNotificationObject,
69 * @see \wcf\system\user\notification\event\IUserNotificationEvent::getEmailMessage()
71 public function getEmailMessage($notificationType = 'instant') { /* not supported */ }
74 * @see \wcf\system\user\notification\event\IUserNotificationEvent::getLink()
76 public function getLink() {
77 return LinkHandler::getInstance()->getLink('User', array('object' => WCF::getUser()), '#wall');
81 * @see \wcf\system\user\notification\event\IUserNotificationEvent::getEventHash()
83 public function getEventHash() {
84 return sha1($this->eventID . '-' . $this->additionalData['objectID']);
88 * @see \wcf\system\user\notification\event\IUserNotificationEvent::supportsEmailNotification()
90 public function supportsEmailNotification() {