3 namespace wcf\data\conversation\message
;
5 use wcf\data\conversation\Conversation
;
6 use wcf\data\search\ISearchResultObject
;
7 use wcf\system\request\LinkHandler
;
8 use wcf\system\search\SearchResultTextParser
;
11 * Represents a list of search result.
14 * @copyright 2001-2019 WoltLab GmbH
15 * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
17 * @property-read string|null $subject
19 class SearchResultConversationMessage
extends ViewableConversationMessage
implements ISearchResultObject
28 * Returns the conversation object.
30 * @return Conversation
32 public function getConversation()
34 if ($this->conversation
=== null) {
35 $this->conversation
= new Conversation(null, [
36 'conversationID' => $this->conversationID
,
37 'subject' => $this->subject
,
41 return $this->conversation
;
47 public function getFormattedMessage()
49 return SearchResultTextParser
::getInstance()->parse(
50 $this->getDecoratedObject()->getSimplifiedFormattedMessage()
57 public function getSubject()
59 return $this->subject
;
65 public function getLink($query = '')
68 return LinkHandler
::getInstance()->getLink('Conversation', [
69 'object' => $this->getConversation(),
70 'messageID' => $this->messageID
,
71 'highlight' => \
urlencode($query),
72 ], '#message' . $this->messageID
);
75 return $this->getDecoratedObject()->getLink();
81 public function getTime()
89 public function getObjectTypeName()
91 return 'com.woltlab.wcf.conversation.message';
97 public function getContainerTitle()
105 public function getContainerLink()