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;
10 * User notification event for profile's owner for commment responses.
12 * @author Alexander Ebert
13 * @copyright 2001-2013 WoltLab GmbH
14 * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
15 * @package com.woltlab.wcf.comment
16 * @subpackage system.user.notification.event
17 * @category Community Framework
19 class UserProfileCommentResponseOwnerUserNotificationEvent extends AbstractUserNotificationEvent {
21 * @see wcf\system\user\notification\event\IUserNotificationEvent::getTitle()
23 public function getTitle() {
24 return $this->getLanguage()->get('wcf.user.notification.commentResponseOwner.title');
28 * @see wcf\system\user\notification\event\IUserNotificationEvent::getMessage()
30 public function getMessage() {
31 // @todo: use cache or a single query to retrieve required data
32 $comment = new Comment($this->userNotificationObject->commentID);
33 $commentAuthor = new User($comment->userID);
35 return $this->getLanguage()->getDynamicVariable('wcf.user.notification.commentResponseOwner.message', array(
36 'author' => $this->author,
37 'commentAuthor' => $commentAuthor
42 * @see wcf\system\user\notification\event\IUserNotificationEvent::getEmailMessage()
44 public function getEmailMessage() {
45 $comment = new Comment($this->userNotificationObject->commentID);
46 $commentAuthor = new User($comment->userID);
47 $owner = new User($comment->objectID);
49 return $this->getLanguage()->getDynamicVariable('wcf.user.notification.commentResponseOwner.mail', array(
50 'author' => $this->author,
51 'commentAuthor' => $commentAuthor,
57 * @see wcf\system\user\notification\event\IUserNotificationEvent::getLink()
59 public function getLink() {
60 return LinkHandler::getInstance()->getLink('User', array('object' => WCF::getUser()), '#wall');