2 namespace wcf\system\user\notification\event;
3 use wcf\system\email\mime\MimePartFacade;
4 use wcf\system\email\mime\RecipientAwareTextMimePart;
5 use wcf\system\request\LinkHandler;
8 * Notification event for followers.
10 * @author Alexander Ebert
11 * @copyright 2001-2016 WoltLab GmbH
12 * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
13 * @package WoltLabSuite\Core\System\User\Notification\Event
15 class UserFollowFollowingUserNotificationEvent extends AbstractUserNotificationEvent {
19 protected $stackable = true;
24 public function getTitle() {
25 $count = count($this->getAuthors());
27 return $this->getLanguage()->getDynamicVariable('wcf.user.notification.follow.title.stacked', ['count' => $count]);
30 return $this->getLanguage()->get('wcf.user.notification.follow.title');
36 public function getMessage() {
37 $authors = array_values($this->getAuthors());
38 $count = count($authors);
41 return $this->getLanguage()->getDynamicVariable('wcf.user.notification.follow.message.stacked', [
42 'author' => $this->author,
43 'authors' => $authors,
45 'others' => $count - 1
49 return $this->getLanguage()->getDynamicVariable('wcf.user.notification.follow.message', ['author' => $this->author]);
55 public function getEmailMessage($notificationType = 'instant') {
57 'template' => 'email_notification_userFollowFollowing',
58 'application' => 'wcf'
65 public function getLink() {
66 return LinkHandler::getInstance()->getLink('User', ['object' => $this->author]);
72 public function getEventHash() {
73 return sha1($this->eventID . '-' . $this->userNotificationObject->followUserID);