3 namespace wcf\system\user\notification\event;
6 * Provides a default implementation for user notifications about comments.
9 * @copyright 2001-2023 WoltLab GmbH
10 * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
13 abstract class AbstractCommentUserNotificationEvent extends AbstractSharedUserNotificationEvent
18 protected $stackable = true;
23 public function getTitle(): string
25 $count = \count($this->getAuthors());
27 return $this->getLanguage()->getDynamicVariable('wcf.user.notification.comment.title.stacked', [
29 'timesTriggered' => $this->notification->timesTriggered,
30 'typeName' => $this->getTypeName(),
34 return $this->getLanguage()->getDynamicVariable('wcf.user.notification.comment.title', [
35 'typeName' => $this->getTypeName(),
42 public function getEmailTitle()
44 $count = \count($this->getAuthors());
46 return $this->getTitle();
49 return $this->getLanguage()->getDynamicVariable('wcf.user.notification.comment.mail.title', [
50 'objectTitle' => $this->getObjectTitle(),
51 'typeName' => $this->getTypeName(),
58 public function getEventHash()
60 return \sha1($this->eventID . '-' . $this->getUserNotificationObject()->objectID);
64 * Returns the name of the type to which the comment belong.
66 protected abstract function getTypeName(): string;
69 * Returns the title of the object to which the comment belong.
71 protected abstract function getObjectTitle(): string;