2 namespace wcf\system\user\notification\event;
3 use wcf\system\request\LinkHandler;
6 * Notification event for followers.
8 * @author Alexander Ebert
9 * @copyright 2001-2016 WoltLab GmbH
10 * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
11 * @package WoltLabSuite\Core\System\User\Notification\Event
13 class UserFollowFollowingUserNotificationEvent extends AbstractUserNotificationEvent {
17 protected $stackable = true;
22 public function getTitle() {
23 $count = count($this->getAuthors());
25 return $this->getLanguage()->getDynamicVariable('wcf.user.notification.follow.title.stacked', ['count' => $count]);
28 return $this->getLanguage()->get('wcf.user.notification.follow.title');
34 public function getMessage() {
35 $authors = array_values($this->getAuthors());
36 $count = count($authors);
39 return $this->getLanguage()->getDynamicVariable('wcf.user.notification.follow.message.stacked', [
40 'author' => $this->author,
41 'authors' => $authors,
43 'others' => $count - 1
47 return $this->getLanguage()->getDynamicVariable('wcf.user.notification.follow.message', ['author' => $this->author]);
53 public function getEmailMessage($notificationType = 'instant') {
54 $authors = array_values($this->getAuthors());
55 $count = count($authors);
58 return $this->getLanguage()->getDynamicVariable('wcf.user.notification.follow.mail.stacked', [
59 'author' => $this->author,
60 'authors' => $authors,
62 'others' => $count - 1,
63 'notificationType' => $notificationType
67 return $this->getLanguage()->getDynamicVariable('wcf.user.notification.follow.mail', ['author' => $this->author]);
73 public function getLink() {
74 return LinkHandler::getInstance()->getLink('User', ['object' => $this->author]);
80 public function getEventHash() {
81 return sha1($this->eventID . '-' . $this->userNotificationObject->followUserID);