c8739b24b9da1506216d87dd95f50c2c0d40b3a2
[GitHub/WoltLab/WCF.git] /
1 <?php
2 namespace wcf\system\user\notification\event;
3 use wcf\system\request\LinkHandler;
4 use wcf\system\user\notification\event\AbstractUserNotificationEvent;
5 use wcf\util\StringUtil;
6
7 /**
8 * Notification event for followers.
9 *
10 * @author Alexander Ebert
11 * @copyright 2001-2013 WoltLab GmbH
12 * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
13 * @package com.woltlab.wcf.user
14 * @subpackage system.user.notification.event
15 * @category Community Framework
16 */
17 class UserFollowFollowingUserNotificationEvent extends AbstractUserNotificationEvent {
18 /**
19 * @see wcf\system\user\notification\event\IUserNotificationEvent::getTitle()
20 */
21 public function getTitle() {
22 return $this->getLanguage()->get('wcf.user.notification.follow.title');
23 }
24
25 /**
26 * @see wcf\system\user\notification\event\IUserNotificationEvent::getMessage()
27 */
28 public function getMessage() {
29 return $this->getLanguage()->getDynamicVariable('wcf.user.notification.follow.message', array('author' => $this->author));
30 }
31
32 /**
33 * @see wcf\system\user\notification\event\IUserNotificationEvent::getEmailMessage()
34 */
35 public function getEmailMessage() {
36 return $this->getLanguage()->getDynamicVariable('wcf.user.notification.follow.mail', array('author' => $this->author));
37 }
38
39 /**
40 * @see wcf\system\user\notification\event\IUserNotificationEvent::getEventHash()
41 */
42 public function getEventHash() {
43 return StringUtil::getHash($this->packageID . '-'. $this->eventID . '-' . $this->author->userID);
44 }
45
46 /**
47 * @see wcf\system\user\notification\event\IUserNotificationEvent::getLink()
48 */
49 public function getLink() {
50 return LinkHandler::getInstance()->getLink('User', array('object' => $this->author));
51 }
52 }