3 namespace wcf\system\user\notification\event;
5 use wcf\system\cache\runtime\CommentRuntimeCache;
6 use wcf\system\user\notification\object\CommentResponseUserNotificationObject;
9 * Provides a default implementation for user notifications about comment responses.
12 * @copyright 2001-2023 WoltLab GmbH
13 * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
16 * @method CommentResponseUserNotificationObject getUserNotificationObject()
18 abstract class AbstractCommentResponseUserNotificationEvent extends AbstractSharedUserNotificationEvent
23 protected $stackable = true;
28 public function getTitle(): string
30 $count = \count($this->getAuthors());
32 return $this->getLanguage()->getDynamicVariable('wcf.user.notification.comment.response.title.stacked', [
34 'timesTriggered' => $this->notification->timesTriggered,
35 'typeName' => $this->getTypeName(),
39 return $this->getLanguage()->getDynamicVariable('wcf.user.notification.comment.response.title', [
40 'typeName' => $this->getTypeName(),
47 public function getEmailTitle()
49 $count = \count($this->getAuthors());
51 return $this->getTitle();
54 return $this->getLanguage()->getDynamicVariable('wcf.user.notification.comment.response.mail.title', [
55 'objectTitle' => $this->getObjectTitle(),
56 'typeName' => $this->getTypeName(),
63 public function getEventHash()
65 return \sha1($this->eventID . '-' . $this->getUserNotificationObject()->commentID);
69 * Returns the name of the type to which the comment belong.
71 protected abstract function getTypeName(): string;
74 * Returns the title of the object to which the comment belong.
76 protected abstract function getObjectTitle(): string;