Merge branch '5.5'
[GitHub/WoltLab/com.woltlab.wcf.conversation.git] / files / lib / system / user / notification / object / ConversationMessageUserNotificationObject.class.php
1 <?php
2
3 namespace wcf\system\user\notification\object;
4
5 use wcf\data\conversation\message\ConversationMessage;
6 use wcf\data\DatabaseObjectDecorator;
7
8 /**
9 * Notification object for conversations.
10 *
11 * @author Marcel Werk
12 * @copyright 2001-2019 WoltLab GmbH
13 * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
14 *
15 * @method ConversationMessage getDecoratedObject()
16 * @mixin ConversationMessage
17 */
18 class ConversationMessageUserNotificationObject extends DatabaseObjectDecorator implements IUserNotificationObject
19 {
20 /**
21 * @inheritDoc
22 */
23 protected static $baseClass = ConversationMessage::class;
24
25 /**
26 * @inheritDoc
27 */
28 public function getTitle(): string
29 {
30 return $this->getConversation()->subject;
31 }
32
33 /**
34 * @inheritDoc
35 */
36 public function getURL(): string
37 {
38 return $this->getLink();
39 }
40
41 /**
42 * @inheritDoc
43 */
44 public function getAuthorID()
45 {
46 return $this->userID;
47 }
48 }