18ba1287b19d2f1279da062eefd1a3ceeab69cd4
[GitHub/WoltLab/WCF.git] /
1 <?php
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;
6 use wcf\system\WCF;
7
8 /**
9 * User notification event for profile commments.
10 *
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
17 */
18 class UserProfileCommentUserNotificationEvent extends AbstractUserNotificationEvent {
19 /**
20 * @see \wcf\system\user\notification\event\IUserNotificationEvent::getTitle()
21 */
22 public function getTitle() {
23 return $this->getLanguage()->get('wcf.user.notification.comment.title');
24 }
25
26 /**
27 * @see \wcf\system\user\notification\event\IUserNotificationEvent::getMessage()
28 */
29 public function getMessage() {
30 return $this->getLanguage()->getDynamicVariable('wcf.user.notification.comment.message', array(
31 'author' => $this->author
32 ));
33 }
34
35 /**
36 * @see \wcf\system\user\notification\event\IUserNotificationEvent::getEmailMessage()
37 */
38 public function getEmailMessage($notificationType = 'instant') {
39 $user = new User($this->userNotificationObject->objectID);
40
41 return $this->getLanguage()->getDynamicVariable('wcf.user.notification.comment.mail', array(
42 'comment' => $this->userNotificationObject,
43 'author' => $this->author,
44 'owner' => $user,
45 'notificationType' => $notificationType
46 ));
47 }
48
49 /**
50 * @see \wcf\system\user\notification\event\IUserNotificationEvent::getLink()
51 */
52 public function getLink() {
53 return LinkHandler::getInstance()->getLink('User', array('object' => WCF::getUser()), '#wall');
54 }
55 }