2 namespace wcf\system\user\notification\event;
3 use wcf\data\comment\Comment;
4 use wcf\data\user\User;
5 use wcf\system\request\LinkHandler;
6 use wcf\system\user\notification\event\AbstractUserNotificationEvent;
9 * User notification event for profile commment responses.
11 * @author Alexander Ebert
12 * @copyright 2001-2013 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 UserProfileCommentResponseUserNotificationEvent extends AbstractUserNotificationEvent {
20 * @see wcf\system\user\notification\event\IUserNotificationEvent::getTitle()
22 public function getTitle() {
23 return $this->getLanguage()->get('wcf.user.notification.commentResponse.title');
27 * @see wcf\system\user\notification\event\IUserNotificationEvent::getMessage()
29 public function getMessage() {
30 // @todo: use cache or a single query to retrieve required data
31 $comment = new Comment($this->userNotificationObject->commentID);
32 $user = new User($comment->objectID);
34 return $this->getLanguage()->getDynamicVariable('wcf.user.notification.commentResponse.message', array(
35 'author' => $this->author,
41 * @see wcf\system\user\notification\event\IUserNotificationEvent::getEmailMessage()
43 public function getEmailMessage($notificationType = 'instant') {
44 $comment = new Comment($this->userNotificationObject->commentID);
45 $user = new User($comment->objectID);
47 return $this->getLanguage()->getDynamicVariable('wcf.user.notification.commentResponse.mail', array(
48 'response' => $this->userNotificationObject,
49 'author' => $this->author,
51 'notificationType' => $notificationType
56 * @see wcf\system\user\notification\event\IUserNotificationEvent::getLink()
58 public function getLink() {
59 // @todo: use cache or a single query to retrieve required data
60 $comment = new Comment($this->userNotificationObject->commentID);
61 $user = new User($comment->objectID);
63 return LinkHandler::getInstance()->getLink('User', array('object' => $user), '#wall');