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') {
55 'template' => 'email_notification_userFollowFollowing',
56 'application' => 'wcf'
63 public function getLink() {
64 return LinkHandler::getInstance()->getLink('User', ['object' => $this->author]);
70 public function getEventHash() {
71 return sha1($this->eventID . '-' . $this->userNotificationObject->followUserID);