32199a0ea6edd59e5f6eed30450904aa0cb98b8d
[GitHub/WoltLab/WCF.git] /
1 <?php
2
3 namespace wcf\system\user\notification\event;
4
5 use wcf\system\request\LinkHandler;
6 use wcf\system\user\notification\object\ModerationQueueUserNotificationObject;
7
8 /**
9 * Notification event for new reports in the moderation queue.
10 *
11 * @author Olaf Braun
12 * @copyright 2001-2024 WoltLab GmbH
13 * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
14 * @since 6.1
15 *
16 * @method ModerationQueueUserNotificationObject getUserNotificationObject()
17 */
18 final class ReportModerationQueueUserNotificationEvent extends AbstractUserNotificationEvent
19 {
20 #[\Override]
21 public function getTitle(): string
22 {
23 return $this->getLanguage()->get('wcf.moderation.report.notification.title');
24 }
25
26 #[\Override]
27 public function getMessage()
28 {
29 return $this->getLanguage()->getDynamicVariable(
30 'wcf.moderation.report.notification.message',
31 [
32 'author' => $this->author,
33 'notification' => $this->notification,
34 'userNotificationObject' => $this->getUserNotificationObject(),
35 ]
36 );
37 }
38
39 #[\Override]
40 public function getEmailMessage($notificationType = 'instant')
41 {
42 // TODO
43 }
44
45 #[\Override]
46 public function getLink(): string
47 {
48 return LinkHandler::getInstance()->getLink('ModerationReport', [
49 'id' => $this->getUserNotificationObject()->queueID,
50 ]);
51 }
52
53 #[\Override]
54 public function getEventHash()
55 {
56 return \sha1($this->eventID . '-' . $this->getUserNotificationObject()->queueID);
57 }
58 }