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 * @method CommentUserNotificationObject getUserNotificationObject()
15 abstract class AbstractCommentUserNotificationEvent extends AbstractSharedUserNotificationEvent
20 protected $stackable = true;
25 public function getTitle(): string
27 $count = \count($this->getAuthors());
29 return $this->getLanguage()->getDynamicVariable('wcf.user.notification.comment.title.stacked', [
31 'timesTriggered' => $this->notification->timesTriggered,
32 'typeName' => $this->getTypeName(),
36 return $this->getLanguage()->getDynamicVariable('wcf.user.notification.comment.title', [
37 'typeName' => $this->getTypeName(),
44 public function getEmailTitle()
46 $count = \count($this->getAuthors());
48 return $this->getTitle();
51 return $this->getLanguage()->getDynamicVariable('wcf.user.notification.comment.mail.title', [
52 'objectTitle' => $this->getObjectTitle(),
53 'typeName' => $this->getTypeName(),
58 * Returns the name of the type to which the comment belong.
60 protected abstract function getTypeName(): string;
63 * Returns the title of the object to which the comment belong.
65 protected abstract function getObjectTitle(): string;