2 namespace wcf\system\user\notification\event;
3 use wcf\system\request\LinkHandler;
4 use wcf\system\user\notification\object\UserFollowUserNotificationObject;
7 * Notification event for followers.
9 * @author Alexander Ebert
10 * @copyright 2001-2016 WoltLab GmbH
11 * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
12 * @package WoltLabSuite\Core\System\User\Notification\Event
14 * @method UserFollowUserNotificationObject getUserNotificationObject()
16 class UserFollowFollowingUserNotificationEvent extends AbstractUserNotificationEvent {
20 protected $stackable = true;
25 public function getTitle() {
26 $count = count($this->getAuthors());
28 return $this->getLanguage()->getDynamicVariable('wcf.user.notification.follow.title.stacked', ['count' => $count]);
31 return $this->getLanguage()->get('wcf.user.notification.follow.title');
37 public function getMessage() {
38 $authors = array_values($this->getAuthors());
39 $count = count($authors);
42 return $this->getLanguage()->getDynamicVariable('wcf.user.notification.follow.message.stacked', [
43 'author' => $this->author,
44 'authors' => $authors,
46 'others' => $count - 1
50 return $this->getLanguage()->getDynamicVariable('wcf.user.notification.follow.message', ['author' => $this->author]);
56 public function getEmailMessage($notificationType = 'instant') {
58 'template' => 'email_notification_userFollowFollowing',
59 'application' => 'wcf'
66 public function getLink() {
67 return LinkHandler::getInstance()->getLink('User', ['object' => $this->author]);
73 public function getEventHash() {
74 return sha1($this->eventID . '-' . $this->getUserNotificationObject()->followUserID);